Task Scheduler - taskeng.exe blocking Sikuli

Asked by holdris

I have created a Sikuli script that works fine when tested and run manually.

However, I would like this to run overnight and so have created a batch file that is run by Windows 7 Task Scheduler at the appropriate time and opens the script.

When Task Scheduler runs it displays a cmd style window called taskeng,exe which sits in front of the windows opened by my Sikuli script and prevents it from running as it should.

I have been unable to find a way to minimise this window to prevent it from impacting the Sikuli code.

Any help would be appreciated.

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
holdris
Solved:
Last query:
Last reply:
Revision history for this message
Eugene S (shragovich) said :
#1

How do you run your script from the task scheduler? do you configure a command line string that launches your script?

Revision history for this message
holdris (simon-holdridge) said :
#2

Hi Eugene,

within the actions tab of task scheduler I have set the action as start a program and in the program/script box I have navigated to the batch file for example E:\Directory 1\Directory 2\ Directory 3\File that runs.bat"

The batch file contains:

"C:\Sikuli - Home\runIDE" -r "Path to the sikuli script)

Thanks again

Revision history for this message
holdris (simon-holdridge) said :
#3

Hi,

just to provide an update for anybody that has a problem with this, as I have now resolved the problem.

You need to create a vbs file that runs the batch file silently, and then set the vbs file to be the program that task scheduler runs.

An example of how the vbs file would look is:

Set Shell = CreateObject("WScript.Shell")
Shell.Run """path/to/your/batch/file""", 0, false

You need the triple quotes to specify the file path and the , 0, false specifies that the batch file will run without the command window.

This should resolve the problem.