Can Sikuli do something at a scheduled time?

Asked by Lexen

I was wondering if there was a way to have Sikuli do something at a given time or date. The best way I can think to do this would be:

setAutoWaitTimeout(999999999)
wait(Image system clock at a Date and time)

Is there a better way?

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

Use the Python modules time and date to calculate an exact waiting time:
something like
wait(targetTime - timeNow)
just check the Python documentation:
http://docs.python.org/library/time.html

another possibility would be to pack the script that should run at a specific time into a .skl and use a system service to schedule the run of the script.

Revision history for this message
Lexen (lexen1) said :
#2

Thanks, that did what I needed. I'm learning so much about this amazing program that has helped me so much.

Revision history for this message
Lexen (lexen1) said :
#3

Thanks RaiMan, that solved my question.