Is there a way to run Sikulix automation scripts with Windows Task Scheduler with the option "Run whether user is logged in or not"?

jksung
jksung used Ask the Experts™
on
I'm able to use Windows Task Scheduler (OS version is Windows 7 Enterprise) to successfully run Sikulix automation scripts when the task has the option "Run only when user is logged on", however, the same script fails if I run with the option "Run whether user is logged in or not", as the Sikuli find() function to locate objects by image recognition isn't working (supposed because Sikuli requires an active monitor for image recognition), some information I have on this are:
http://superuser.com/questions/78359/why-is-windows-7-scheduled-task-running-hidden
https://technet.microsoft.com/en-us/library/cc722152.aspx

However, I would like to have the scripts running with the "Run whether user is logged in or not" option, because with the "Run only when user is logged on" option, the scheduled scripts will not run if the user is not logged on, either remotely or locally, and this will not be possible as this machine is shared with the offshore team.

Is there a way to run Sikulix automation scripts with Windows Task Scheduler with the option "Run whether user is logged in or not"?  Otherwise is there a way to successfully schedule Sikulix script runs without requiring the account scheduling the runs to always be logged on?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016
Commented:
You are out of luck since it requires running with a logged on user.
SikuliX automates anything you see on the screen of your desktop computer running Windows, Mac or some Linux/Unix. It uses image recognition powered by OpenCV to identify and control GUI components. This is handy in cases when there is no easy access to a GUI's internals or the source code of the application or web page you want to act on.
Top Expert 2014
Commented:
Do you have the "wake the system" checkbox selected?

What happens if you turn off the monitor and run the script?
Gerwin Jansen, EE MVETopic Advisor
Most Valuable Expert 2016
Commented:
Agree with first comment given, there has to be a user logged on for SikuliX to work.

But what about what you want to have the scripts do exactly, can you elaborate on that?

You could automate the logon of a user and then schedule the scripts to run.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
Basically we are trying to schedule the same sikuli scripts to test the same web application on eight different enviroments overnight, so that the results of the runs on all the environments can be posted to a webpage the next day.  The server that is running this is our sole server that allows non company sanctioned software to be installed (for the dev team to be able to try things) that is also running other things, so we cannot have a dedicated user logged in locally just to run these scripts.

I haven't tried the wake the system option, but the scripts will run with the monitor turned off, as long as the option in task manager is "Run only when the user is logged on".
Gerwin Jansen, EE MVETopic Advisor
Most Valuable Expert 2016
Commented:
You have another machine to do the tests? Since you're now talking about a server where Windows 7 Enterprise is a client instalation.

Anyway, just disable the screensaver/lockout and switch off the display and you should be fine for your test runs.

Author

Commented:
Thanks all for your help, because of this issue with task scheduler, I will try to run the scripts on a dedicated virtual machine on Jenkins instead.
Gerwin Jansen, EE MVETopic Advisor
Most Valuable Expert 2016

Commented:
That's OK, if you have any results to share post back here. Thanks.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial