How can I write a script which should run at every 3 hours?
I do not want to use crontab.
How can I write a script which should run at every 3 hours?
I do not want to use crontab.
You need deamon exemplified in How to make Python script run as service? and make changes
import time
class MyDaemon(Daemon):
def run(self):
while True:
time.sleep(60 * 60 * 3) # Delay for 1 hour in seconds
print "3 hours pass."