diff --git a/litellm/proxy/scheduled_tasks/endpoints.py b/litellm/proxy/scheduled_tasks/endpoints.py index 8d1c89b6215..1990eb6e646 100644 --- a/litellm/proxy/scheduled_tasks/endpoints.py +++ b/litellm/proxy/scheduled_tasks/endpoints.py @@ -166,7 +166,7 @@ async def create_scheduled_task( schedule_spec=data.schedule_spec, schedule_tz=data.schedule_tz, next_run_at=next_run_at, - expires_at=data.expires_at, + expires_at=expires_at, fire_once=fire_once, ) return _row_to_response(row) diff --git a/litellm/proxy/scheduled_tasks/schedule.py b/litellm/proxy/scheduled_tasks/schedule.py index b4442224e1f..bb22df4e2f7 100644 --- a/litellm/proxy/scheduled_tasks/schedule.py +++ b/litellm/proxy/scheduled_tasks/schedule.py @@ -22,7 +22,7 @@ from apscheduler.triggers.cron import ( # type: ignore[import-not-found, import ) -_INTERVAL_RE = re.compile(r"^\s*(\d+)\s*([smhd])\s*$", re.IGNORECASE) +_INTERVAL_RE = re.compile(r"^\s*([1-9]\d*)\s*([smhd])\s*$", re.IGNORECASE) _INTERVAL_UNITS = { "s": "seconds", "m": "minutes",