repost: http web page fetch question

grocery_stocker cdalten at
Fri Apr 24 16:54:40 CEST 2009

Given the following...

[cdalten at localhost oakland]$ more

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',))
[cdalten at localhost oakland]$ ./
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