import threading
interval = 15
def myPeriodicFunction():
print "This loops on a timer every %d seconds" % interval
def startTimer():
threading.Timer(interval, startTimer).start()
myPeriodicFunction()
startTimer()
watch -n 15m python yourcode.py
https://stackoverflow.com/questions/45221522/python-loop-at-exact-time-intervals
'LANGUAGE > Python' 카테고리의 다른 글
Setting for UNDO in PyCharm (0) | 2020.08.20 |
---|---|
How to solve the issue, 'cp949' codec can't decode? (0) | 2020.02.28 |
Statistical Visualization or Data Visualization (0) | 2019.08.23 |
Python Tutorials (0) | 2019.08.23 |
How to check whether a variable exists or not? (0) | 2019.08.01 |