1import schedule
2import time
3
4def job(t):
5 print "I'm working...", t
6 return
7
8schedule.every().day.at("01:00").do(job,'It is 01:00')
9
10while True:
11 schedule.run_pending()
12 time.sleep(60) # wait one minute
13
1from datetime import datetime
2from threading import Timer
3
4x=datetime.today()
5y=x.replace(day=x.day+1, hour=1, minute=0, second=0, microsecond=0)
6delta_t=y-x
7
8secs=delta_t.seconds+1
9
10def hello_world():
11 print "hello world"
12 #...
13
14t = Timer(secs, hello_world)
15t.start()
16