Bug in Python APscheduler module.
anand jeyahar
anand.ibmgsi at gmail.com
Fri Mar 19 02:03:21 EDT 2010
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/students/anand
==============================================
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100319/7bdf21e1/attachment.html>
More information about the Python-list
mailing list