Answers for "how to run python script in time interval"

3

how to run a function in interval in python

# this makes program sleep in intervals
from time import time, sleep
while True:
    sleep(1 - time() % 1) # run every 1 second... you can change that
	# thing to run
Posted by: Guest on December-22-2020

Code answers related to "how to run python script in time interval"

Python Answers by Framework

Browse Popular Code Answers by Language