repost: http web page fetch question

grocery_stocker cdalten at gmail.com
Fri Apr 24 10:54:40 EDT 2009


Given the following...

[cdalten at localhost oakland]$ more basic.py
#!/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()
[cdalten at localhost oakland]$ ./basic.py
START: 1240584506.06
EVENT: 1240584508.06 first
[cdalten at localhost oakland]$


How do I modify it so that it runs every hour on the hour.



More information about the Python-list mailing list