title: how to cancel python schedule
body: <p>I have a repeated python schedule task as following,which need to run getMyStock() every 3 minutes in startMonitor():</p>
  
  <pre><code>from stocktrace.util import settings
  import time, os, sys, sched
  schedule = sched.scheduler(time.time, time.sleep)
  
  def periodic(scheduler, interval, action, actionargs=()):
    scheduler.enter(interval, 1, periodic,
                    (scheduler, interval, action, actionargs))
    action(*actionargs)
  
  
  def startMonitor():    
      from stocktrace.parse.sinaparser import getMyStock       
  
      periodic(schedule, settings.POLLING_INTERVAL, getMyStock)
      schedule.run( )
  </code></pre>
  
  <p>The questions are:</p>
  
  <p>1.how could i cancel or stop the schedule when some user event comes?</p>
  
  <p>2.Is there any other python module for better repeated scheduling?Just like java quartz?</p>