DeaD_EyE May 20th, 2018 122 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- import datetime
- time_target = datetime.datetime(2018, 5, 20, 13, 0)
- while True:
- time_now = datetime.datetime.now()
- if time_now > time_target:
- print('Doing something')
- time.sleep(5) # wait 5 seconds
- # program ends, when time_target has been reached.
RAW Paste Data