I need an event scheduler where the time can be set in hours, minutes, seconds and milliseconds. Would anyone have a package or code they could recommend?
Thank you,
yeto
(Jul-12-2019, 06:58 PM)nilamo Wrote: [ -> ]https://schedule.readthedocs.io/en/stable/ maybe?
Quote:import schedule
import time
def job():
print("I'm working...")
schedule.every(10).minutes.do(job)
schedule.every().hour.do(job)
schedule.every().day.at("10:30").do(job)
schedule.every().monday.do(job)
schedule.every().wednesday.at("13:15").do(job)
schedule.every().minute.at(":17").do(job)
while True:
schedule.run_pending()
time.sleep(1)
I was not able to install the "time" package. Would there be a work around?
Thank you,
yeto
time
does not need installing, its part of the python standard library.
(Jul-12-2019, 06:58 PM)nilamo Wrote: [ -> ]https://schedule.readthedocs.io/en/stable/ maybe?
It works. Thank you. I just need to modify it a little to suit my needs. Thanks to you I am on my way to completing my first script.
Thank you,
yeto
(Jul-12-2019, 10:49 PM)Yoriz Wrote: [ -> ]time
does not need installing, its part of the python standard library.
Thank you. That helped. I also Googled "python standard library" so I will know to check there first in the future.
Thank you for taking time to help a newbie,
yeto