diff --git a/api/routes.py b/api/routes.py index 8524c3e2125..f6473f53957 100644 --- a/api/routes.py +++ b/api/routes.py @@ -94,6 +94,8 @@ def _cron_output_content_window(text: str, limit: int = _CRON_OUTPUT_CONTENT_LIM def _run_cron_tracked(job): """Wrapper that tracks running state around cron.scheduler.run_job.""" + from cron.scheduler import run_job + try: run_job(job) finally: