Run Sikuli Script using Windows Task Scheduler in Windows 7

Asked by s

I'm using sikuli ide 1.0.1, and can someone help me running .sikuli apps in windows task scheduler

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Eugene Maslov (emaslov1) said :
#1

Hi suba,
I use 1.1.0, but, as far as I recall, it works the same, just start file name is different.
Suppose there is the test script at c:\sikuli_tests\mytests.sikuli .

Call the scheduler
"Task scheduler library" item in the tree - call popup, click "create task"
"General" tab - fill name and description
"Triggers" tab - click New, fill the schedule
Actions tab - click New,
   - "Program/script": type like "c:\Sikuli\runsikulix.cmd" (runscript.cmd for 1.0.1 )
   - "Add Arguments": type the parameters that you want, e.g. "-r c:\sikuli_tests\mytests.sikuli -d 1 -f d:\temp\sikuli.log --args -u inch -t test_002" (test parameters, if any needed, after --args, like -u, -t, etc., should be parsed by mytests.sikuli, maybe using argparse module or like that)
Click OK in the task creation dialog.

Revision history for this message
s (skish) said :
#2

Hi Eugene,

Thanks for the information. So, I tried this

  - "Program/script": type like "c:\Sikuli\runsikulix.cmd" (runscript.cmd for 1.0.1 )

   - "Add Arguments": "-r c:\sikuli_tests\mytests.sikuli

When task scheduler runs its, it opens the cmd prompt and cmd prompt just disappears.

Please help.

Thanks,
Suba

Revision history for this message
Eugene Maslov (emaslov1) said :
#3

skish,
If nothing happens before the window is closed, it can mean that something is wrong in the mytests.sikuli script and it dies with an error, or some other error occurs.
run cmd from start menu and put there concatenated command
c:\Sikuli\runsikulix.cmd -r c:\sikuli_tests\mytests.sikuli
cmd will write what's wrong there.

Can you help with this problem?

Provide an answer of your own, or ask s for more information if necessary.

To post a message you must log in.