How to stop a scheduler stated using

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Fri May 18 21:42:53 EDT 2007


En Fri, 18 May 2007 04:00:57 -0300, Nagendra Kumar <btnkumar at 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




More information about the Python-list mailing list