sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #16854
[Question #223076]: Sleep until specific time, or start at specific time?
New question #223076 on Sikuli:
https://answers.launchpad.net/sikuli/+question/223076
Dear the best automation software in the world:
Is there a best practice for sleeping until a specific time, or launching at a specific time? I'm trying this:
import time
import datetime
for i in xrange(0,365):
# sleep until 8AM
t = datetime.datetime.today()
future = datetime.datetime(t.year,t.month,t.day+(t.hour >= 8 ),8,0)
time.sleep((future-t).seconds)
But I'm having mixed success with it. I'm sure there is a better way to do it.
Thanks so much!
Chris
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.