Is there an easy way to get a python code segment to run every 5 minutes?
I know I could do it using time.sleep() but was there any other way?
For example I want to run this every 5 minutes:
x = 0
def run_5():
print "5 minutes later"
global x += 5
print x, "minutes since start"
That's only a fake example but the idea is there.
Any ideas?
I am on linux and would happily use cron but was just wondering if there was a python alternative?