Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.python
Bug in Python APscheduler module.
anand jeyahar
3/19/2010 6:03:00 AM
Hi ,
I looked everywhere and could find no mention of this(might be
looking in the wrong places point me please..). the Python package Advanced
python scheduler seems to have a bug with the unschedule func. When
passing the function of an object it doesn't remove it from the scheduler.
but works fine with a normal function. Please find my test script attached
and guide me...
from apscheduler.scheduler import Scheduler
def test_func():
print "test func"
class test_class():
def test_class1(self):
print "test class"
def main():
sched=Scheduler()
sched.start()
tc=test_class()
tc.test_class1()
print sched.add_interval_job(test_func,minutes=1)
print sched.add_interval_job(tc.test_class1,minutes=1)
print sched.add_interval_job(test_func,seconds=20)
print "jobs b4 unschedule"
print sched.jobs
# sched.unschedule_func(test_func)
sched.unschedule_func(tc.test_class1)
print "jobs after unschedule"
print sched.jobs
sched.shutdown()
if __name__=='__main__':
main()
~
~
~
~
==============================================
Anand J
http://sites.google.com/a/cbcs.ac.in/stud...
==============================================
The man who is really serious,
with the urge to find out what truth is,
has no style at all. He lives only in what is.
~Bruce Lee
Love is a trade with lousy accounting policies.
~Aang Jie
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Bug in Python APscheduler module.
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password