sched() function questions

Chris Hare chare at
Sat Aug 7 05:37:26 CEST 2010

I am currently using threading.timer to execute an event in my big chunk of code.  This is causing a problem with sqlite, so I am trying to figure out the sched function

import sched
import time

def timerfunc():
    print "hello", time.time()

def delay(period):

def some():
    s.enterabs(900,1, timerfunc, () )

s = sched.scheduler(timerfunc, delay)

print time.time()
x = 0
while 1:
    print x
    x = x + 1
    print str(s.queue())

What I am trying to do is mimic the Timer function, where my code will continue to function while my scheduled function executes in 15 minutes or 900 seconds.  This doesn't do it though.  Any help?

More information about the Python-list mailing list