repost: http web page fetch question

Emile van Sebille emile at
Fri Apr 24 20:21:28 CEST 2009

grocery_stocker wrote:
> Given the following...
> [cdalten at localhost oakland]$ more
> How do I modify it so that it runs every hour on the hour.

I'd probably use cron, but here's one way.


import sched
import time

scheduler = sched.scheduler(time.time, time.sleep)

def print_event(count,rescheduler):
         print 'EVENT:', time.time(), count

print 'START:', time.time()
scheduler.enter(2, 1, print_event, (1,scheduler))

More information about the Python-list mailing list