def start(self):
    self._running = True
self.periodic(getMyStock)
self.schedule.run()

def stop(self):
    self._running = False
if self.schedule and self.event:
    self.schedule.cancel(self.event)
how to cancel python schedule