def run(self):
        """Start running the repeated background task in the loop."""
        self.running = True
        while self.running:
            time.sleep(self.interval)
            if not self.running:
                return
            try:
                self.function(*self.args, **self.kwargs)
            except Exception:
                if self.bus:
                    self.bus.log(
                        'Error in background task thread function %r.'
                        % self.function,
                        level=40,
                        traceback=True,
                    )
                # Quit on first error to avoid massive logs.
                raise
Start running the repeated background task in the loop.
cherrypy/process/plugins.py