Answers for "how to run python module every 10 sec"

0

how to run python module every 10 sec

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)

while 1:
    schedule.run_pending()
    time.sleep(1)
Posted by: Guest on February-21-2022

Code answers related to "how to run python module every 10 sec"

Python Answers by Framework

Browse Popular Code Answers by Language