Scheduling
Ciaren has a lightweight, in-process scheduler that runs a flow on a cron schedule, with no broker or extra service. It suits simple recurring jobs. It is not an Airflow or dbt replacement.
How it runs
The scheduler is a single asyncio poller that starts inside the API process.
ciaren serve runs both. To run the API without it, use
ciaren serve --no-scheduler or CIAREN_SCHEDULER_ENABLED=false.
Creating a schedule
Click Schedule in the flow editor toolbar, or go to the Schedules page, to open the schedule builder:


The Recent runs column shows each schedule's last five runs as status icons (oldest to newest), so you can spot a flaky or failing schedule at a glance. Click an icon to open that run in the run detail view.
The picker shows a plain-language summary and the cron expression as you switch between presets and Custom (cron). Minutes fires every N minutes (1 to 59), and Hourly fires once an hour at a chosen minute:

Pick a frequency or enter a cron expression, then a timezone. Over the API, the same schedule looks like this:
curl -X POST http://localhost:8055/api/flows/{flow_id}/schedules \
-H "Content-Type: application/json" \
-d '{
"cron": "0 7 * * *",
"timezone": "America/New_York",
"engine": "polars",
"is_enabled": true,
"catch_up": false,
"max_retries": 2,
"retry_delay_seconds": 60
}'| Field | Default | Description |
|---|---|---|
cron | None (required) | Standard 5-field cron expression |
timezone | UTC | IANA timezone used to interpret the cron |
name / description | null | Optional labels |
engine | null | Engine for scheduled runs; falls back to the server default |
is_enabled | true | Whether the schedule is active |
catch_up | false | Run slots missed while the server was down |
max_retries | 0 | Retries for a failed run before giving up to the next slot (max 10) |
retry_delay_seconds | 60 | Base backoff between retries |
run_timeout_seconds | null | Per-schedule run timeout override; falls back to RUN_TIMEOUT_SECONDS (0 = no limit) |
parameters | null | Flow-parameter overrides applied to every run this schedule fires |
A schedule runs the flow as it was last saved. A change saved from a Flow assistant proposal, or a reversal in its Activity list, applies from the next slot.
Parameterized flows
If the flow declares parameters, the schedule form has a Parameter values section. The values apply to every run the schedule fires, and blanks fall back to each parameter's default. One flow can back several schedules that differ only in their parameter values.
Lifecycle overview
- TriggerCron firesPoller wakes every 30 s, checks
next_run_at - RunRun executesFlow runs on the engine; concurrent limit respected
- SuccessRun recorded
next_run_atadvances to the next cron slot - IdleWait for next slotFailure streak resets
- FailedFailure streak increments
- RetryRetry (if max_retries > 0)Exponential backoff, capped at 1 h
- DisabledAuto-disable (after 5 failures)Re-enable in the UI to clear the streak
How it decides what to run
Each schedule stores its next_run_at (a UTC timestamp) in the database. It is
the single source of truth, so schedules survive restarts with no separate job
store. The poller wakes every SCHEDULER_POLL_INTERVAL_SECONDS (30 by default),
runs whatever is due, and computes the next slot.
Scheduled runs are recorded like any other run, tagged with their
trigger and schedule_id. Browse them via GET /api/schedules/{id}/runs or
GET /api/runs?schedule_id=..., and they open in the normal
run detail view.
Reliability behaviors
- Concurrency and overlap. Scheduled runs are capped at
SCHEDULER_MAX_CONCURRENT_RUNS(1 by default). A schedule skips a slot while its previous run is still going, so runs never pile up. - Catch-up. If the server was down across one or more slots,
catch_updecides whether the flow runs when it returns. With it on, the flow runs once to cover the missed slots, not once per slot. With it off (the default), Ciaren skips to the next future slot. - Retries. A failed run retries up to
max_retriestimes with exponential backoff fromretry_delay_seconds, capped at 1 hour. Then the schedule waits for the next cron slot. - Auto-disable. After
SCHEDULER_MAX_CONSECUTIVE_FAILURESconsecutive failed runs (5 by default), the schedule is disabled and records adisabled_reason. Re-enabling it clears the streak. A run you cancel does not count as a failure. - Alerts. Set
CIAREN_NOTIFY_WEBHOOK_URLto get a message when a run fails or a schedule disables itself. See Failure notifications. - Orphan recovery. On startup, runs left in
runningby a crash are markedfailed, because a single process cannot resume them. - Run now.
POST /api/schedules/{id}/run-nowstarts an immediate one-off run that stays outside the retry and auto-disable logic.
Configuration
| Setting | Default | Description |
|---|---|---|
CIAREN_SCHEDULER_ENABLED | true | Master on/off switch |
CIAREN_SCHEDULER_POLL_INTERVAL_SECONDS | 30 | How often the poller wakes |
CIAREN_SCHEDULER_MAX_CONCURRENT_RUNS | 1 | Max simultaneous scheduled runs |
CIAREN_SCHEDULER_MAX_CONSECUTIVE_FAILURES | 5 | Failures before auto-disable (0 = never) |
Limitations
- One schedule runs one flow. There are no dependencies between flows.
- The scheduler is single-process. For high availability or distributed scheduling, export the flow's Python and run it under your own orchestrator.
See also
- REST API: Schedules
- Projects & Runs: where scheduled runs show up
- CLI Reference:
--no-schedulerand scheduler env vars