<@ULVA73B9P> I'm using the prefect open source, th...
# ask-marvin
c
@Marvin I'm using the prefect open source, the scheduler is enabled but I have a deployment defined as:
Copy code
- name: clean_stuck_runs
  version: 0.1.0
  tags: []
  concurrency_limit: null
  description: null
  schedules:
    - cron: "*/30 * * * *"
      timezone: "Europe/Berlin"
      active: true
      max_scheduled_runs: 6
  entrypoint: flows/clean_stuck_runs/clean_stuck_runs_flow.py:clean_stuck_runs_flow
  parameters: {}
  work_pool:
    name: maintenance_jobs_agent_production
    job_variables:
      image: _IMAGE_SHA_URI
      namespace: prod
      name: clean-up-stuck-flows-job
      environment: production
    parameters: {}
and no scheduled flow runs were scheduled. What's the root cause? is it the prefect server?
m
thought for 575.4 seconds
Short answer: it’s usually not the worker/agent or your work pool. In Prefect 3.x the Server’s scheduler is the piece that creates “Scheduled” flow runs. If none are appearing, it’s almost always one of these: 1) The deployment on the server doesn’t actually have a schedule - Editing
prefect.yaml
isn’t enough — you must register/update the deployment. - Verify the deployment and its schedules as seen by the API:
Copy code
prefect deployment ls
prefect deployment inspect "<flow-name>/<deployment-name>"
If
schedules
is empty there, rerun:
Copy code
prefect deploy
More on deployment in 3.x: Deployments 2) The Server scheduler isn’t actually running - If Server was started with
--no-services
or
--no-scheduler
, nothing will be created. - Check how you start Server and config:
Copy code
prefect server start --help
prefect config view --show-defaults | grep -i scheduler
You should see the scheduler enabled. Docs: Schedules 3) Timezone resolution is failing in the Server environment - Your schedule uses
timezone: "Europe/Berlin"
. Prefect relies on the system’s IANA tz database (zoneinfo). In lean containers without tzdata, resolving that timezone can fail (e.g., ZoneInfoNotFoundError) and the scheduler will skip scheduling. - Check the server logs for errors around timezone handling. - Quick test in the same environment:
Copy code
python -c "from zoneinfo import ZoneInfo; ZoneInfo('Europe/Berlin'); print('ok')"
- If it fails, install tzdata (e.g., Debian/Ubuntu: `apt-get update && apt-get install -y tzdata`; Alpine:
apk add tzdata
) or temporarily remove the timezone/use
UTC
. 4) Clock skew or “late runs” disabled - If the server clock is off and
late-runs
is disabled, missed runs won’t backfill. You’d still see future runs, but it’s worth checking:
Copy code
prefect server start --help  # look for --late-runs/--no-late-runs
prefect config view --show-defaults | grep -i late
A quick checklist to pinpoint root cause - Confirm the deployment (on the server) really has the cron schedule:
Copy code
prefect deployment ls
prefect deployment inspect "<flow-name>/<deployment-name>"
- Confirm the Server scheduler is enabled and running (no
--no-services
, no
--no-scheduler
). - Check Server logs for timezone errors; validate tzdata with the Python snippet above. If you share: - your Prefect version, - how you start Prefect Server, - the output of
prefect deployment inspect
for this deployment, I can zero in on the exact cause. References - Schedules: Prefect 3.x Schedules - Settings reference: Settings reference