By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,660 Members | 1,187 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,660 IT Pros & Developers. It's quick & easy.

How to stop a scheduler stated using

P: n/a
Hello ALL,

I am trying to schdule some of my class methods using sched module of
python

import sched, time
s=sched.scheduler(time.time, time.sleep)

event1=s.enter(60, 1, obj.scheduleAbuseAssignment1, ())
event2=s.enter(60, 1, obj.scheduleAbuseAssignment2, ())
event3=s.enter(60, obj.scheduleAbuseAssignment3, ())

Is there any way to stop these scheduled events?If so, can we do it
through a UI

Thanks in advance.

Regards,
- Nagendra Kumar

May 18 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
En Fri, 18 May 2007 04:00:57 -0300, Nagendra Kumar <bt******@gmail.com>
escribió:
import sched, time
s=sched.scheduler(time.time, time.sleep)

event1=s.enter(60, 1, obj.scheduleAbuseAssignment1, ())
event2=s.enter(60, 1, obj.scheduleAbuseAssignment2, ())
event3=s.enter(60, obj.scheduleAbuseAssignment3, ())

Is there any way to stop these scheduled events?If so, can we do it
through a UI
Using s.cancel(event1). The UI is up to you...
See http://docs.python.org/lib/scheduler-objects.html

--
Gabriel Genellina

May 19 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.