From: anand jeyahar on
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
From: Terry Reedy on
On 3/19/2010 2:03 AM, anand jeyahar wrote:
> 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.

The site for that package
http://apscheduler.nextday.fi/
has links for Getting Help and Reporting Bugs.