I've tried asking this same question on a few other forums but I've gotten no response. Maybe the question is worded poorly? Anyhow, given the following...
[cd@localhost oakland]$ more basic.py
[cd@localhost oakland]$ ./basic.pyCode:#!/usr/bin/python import sched import time scheduler = sched.scheduler(time.time, time.sleep) def print_event(name): print 'EVENT:', time.time(), name print 'START:', time.time() scheduler.enter(2, 1, print_event, ('first',)) scheduler.run()
START: 1240584506.06
EVENT: 1240584508.06 first
[cd@localhost oakland]$
How do I modify basic.py so that it runs every hour on the hour on its own without using crontabs or anything like that.



LinkBack URL
About LinkBacks


