    async def run_task(self, task:Task, *args, **kwargs):
        """Run a given task"""
        try:
            await task.start_async(log_queue=self._log_queue)
        except (SchedulerRestart, SchedulerExit):
            raise
        except TaskLoggingError:
            self.logger.exception(f"Logging failed for task '{task.name}'")
            if not self.session.config.silence_task_logging:
                raise
        except TaskSetupError:
            self.logger.exception(f"Task '{task.name}' crashed outside execution.")
            if not self.session.config.silence_task_prerun:
                raise
        else:
            exception = None
            status = "success"
Run a given task
rocketry/core/schedule.py