scheduler.cancel()
scheduler.cancel() is a Python method in the Sched Module category. Cancels a scheduled event. The syntax is scheduler.cancel(event). Returns: None. A typical example: event = s.enter(10, 1, myfunc)
s.cancel(event) # Remove from schedule. A close sibling is sched.scheduler(), which creates an event scheduler for delayed/periodic tasks. A close sibling is scheduler.enter(), which schedules an event after `delay` seconds. A close sibling is scheduler.enterabs(), which schedules an event at an absolute time. A close sibling is scheduler.run(), which runs all scheduled events. Blocks until no more events. More about this category: Event scheduler — scheduler, enter, enterabs, run, cancel. Related Sched Module entries: sched.scheduler(), scheduler.enter(), scheduler.enterabs(), scheduler.run(), scheduler.empty(). This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details. You can try scheduler.cancel() immediately in the Python playground, look up unfamiliar terms in the glossary, or return to the Python Reference homepage.