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

+ Recent posts