Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Need an event scheduler that can get down to milliseconds.
#1
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
Quote
#2
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)
j.crater likes this post
Quote
#3
(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
Quote
#4
time does not need installing, its part of the python standard library.
Skaperen likes this post
Quote
#5
(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
Quote

Top Page

Forum Jump:


Users browsing this thread: 1 Guest(s)