Answers for "python exceute 60 records per minute counter"

0

python exceute 60 records per minute counter

import sched, time
s = sched.scheduler(time.time, time.sleep)
def do_something(sc): 
    print("Doing stuff...")
    # do your stuff
    s.enter(60, 1, do_something, (sc,))

s.enter(60, 1, do_something, (s,))
s.run()
Posted by: Guest on April-16-2021

Python Answers by Framework

Browse Popular Code Answers by Language