code: def run(self):
          '''Start scheduler loop'''
          logger.info("scheduler starting...")
  
          while not self._quit:
              try:
                  time.sleep(self.LOOP_INTERVAL)
                  self.run_once()
                  self._exceptions = 0
              except KeyboardInterrupt:
                  break
              except Exception as e:
                  logger.exception(e)
                  self._exceptions += 1
                  if self._exceptions > self.EXCEPTION_LIMIT:
                      break
                  continue
  
          logger.info("scheduler exiting...")
          self._dump_cnt(f run(self):
          '''Start scheduler loop'''
          logger.info("scheduler starting...")
  
          while not self._quit:
              try:
                  time.sleep(self.LOOP_INTERVAL)
                  self.run_once()
                  self._exceptions = 0
              except KeyboardInterrupt:
                  break
              except Exception as e:
                  logger.exception(e)
                  self._exceptions += 1
                  if self._exceptions > self.EXCEPTION_LIMIT:
                      break
                  continue
  
          logger.info("scheduler exiting...")
          self._dump_cnt()
docs: Start scheduler loop