Is running a sikuli script still possible using Windows task scheduler?

Asked by ZystemZadmin on 2019-05-23

Hello,

I have a .bat file that contains the following command:

C:\SikuliX\runsikulix.cmd -r C:\SikuliX\Script.sikuli

When I double click on this .bat file the script launches and runs successfully.

When I ask Windows Task Scheduler to run this job and try to manually run it from the task scheduler, nothing happens.

Under 'Program/Script:' under the 'Actions' tab I have set that to the .bat file. I have also created an action that has references the full path to C:\SikuliX\runsikulix.cmd under 'Program/script:' and under 'Add arguments (optional):' I had '-r C:\SikuliX\Script.sikuli'.

Neither ways have spun the script up and worked for me. Does anyone know what I am doing wrong?

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
2019-05-23
Last query:
2019-05-23
Last reply:
2019-05-23
RaiMan (raimund-hocke) said : #1

you have to run task scheduler tasks with SikuliX in an admin environment.

ZystemZadmin (zystemzadmin) said : #2

Hi @RaiMan,

I have created it in an admin environment - it is running on a VM that I am admin on.

Thank you!

ZystemZadmin (zystemzadmin) said : #3

Hi @RaiMan,

I have created it in an admin environment - it is running on a VM that I am admin on.

Thank you!

Best RaiMan (raimund-hocke) said : #4

You might have admin rights on this machine, but the same as with command windows (variants normal and as admin) there is a task variant that is run in an admin environment.

Has something to do with UAC, where you are also asked by Windows for critical actions, though you are the machine admin.

ZystemZadmin (zystemzadmin) said : #5

I've tried running it under 'SYSTEM' account as well, but no change? Do you think that should have worked?

ZystemZadmin (zystemzadmin) said : #6

Thanks RaiMan, that solved my question.