Anonymous     Python     02 Sep 2011    
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import datetime
from twisted.internet import reactor
from txscheduling.cron import CronSchedule
from txscheduling.task import ScheduledCall
configline = '* * * * *'
schedule = CronSchedule(configline)
def printer():
print datetime.datetime.now()
call = ScheduledCall(printer)
call.start(schedule)
reactor.run()