Schedules: run blueprints on a timer
A schedule attaches to a blueprint and runs it on that timetable — daily, weekly, or on a cron expression. No custom scheduler, no cron jobs on your server.
How it works
You need a blueprint first. Then you attach a schedule to it. The schedule tells Cadreen when to run the blueprint and with what parameters.
Each run creates its own trace — inspect every execution in the dashboard
Each run creates a new execution with its own trace. If a run can't start its execution, Cadreen tries again as a new run (attempt 2 after a minute, attempt 3 after two more, up to 3 attempts); each failed attempt stays in the history. An execution that did start and then failed is not retried unless the schedule's on_failure is retry, because trying it again can repeat work it already did. Pausing a schedule cancels the retries waiting for it. If the server was down when a time came, the schedule's misfire_policy decides: run_once (the default) runs it once, skip runs none, run_all_missed runs each (up to 24); every time that doesn't run is recorded as a skipped run. If the last run is still going, concurrency_policy decides: skip_if_running (the default) records a skipped run, allow_overlap starts another, queue_next waits for it, and cancel_previous cancels it. A schedule's autonomy decides whether it runs by itself: execute_if_policy_allows (the default) runs, notify_only only tells you a time came (a skipped run and a schedule.run.needs_human event), and require_approval_each_run waits for someone in your workspace to approve each run in Decisions; an unanswered question ends when the schedule next comes due. When a run fails for good, on_failure pause pauses the schedule and continue keeps it running without a failure notice.
Create a schedule
Two trigger types: recurring (hourly, daily, weekdays with an optional list, weekly on one weekday, or monthly on a day of the month, each at a 24-hour time) and cron (a five-field expression: minute, hour, day of month, month, day of week — no seconds field and no @daily shortcuts).
Times are read in the schedule's timezone, an IANA name such as Europe/London (UTC when you leave it out). A zone we don't know, a time that isn't a time, or an expression we can't read is refused with a 400 that says which; nothing is saved and nothing falls back to a default. A weekly schedule runs on the weekday you give, or the one it was made on; a monthly one on the day you give, or the day it was made, and on the last day of a month too short for it. When a clock change skips a time (for example 02:30 on the night the clocks go forward), the schedule's dst_policy decides: by default it runs as far into the new hour as it was into the missing one (03:30), skip_nonexistent_time skips that day and run_next_valid_time runs at the first moment after the gap. A time that happens twice runs once, at its first occurrence. Editing the trigger or the time zone moves the next run straight away.
Default inputs (params) can't be used by a run yet, so a schedule that carries them is refused and nothing is saved. Before it says so, the inputs are checked against the workflow's parameter_schema: inputs that don't match get a 400 params_invalid that names each input and what is wrong with it, and a schema that can't be used gets parameter_schema_invalid.
curl -X POST https://api.cadreen.com/api/v1/cadreen/schedules \
-H "Authorization: Bearer sk_cadreen_..." \
-H "Content-Type: application/json" \
-d '{
"blueprint_id": "9b2f6c1e-4a7d-4e2b-8c3f-1d5e7a9b0c21",
"name": "Daily morning report",
"trigger": { "type": "recurring", "frequency": "daily", "time": "09:00" },
"timezone": "America/New_York"
}'Pause and resume
Pause a schedule when you don't need it running — vacations, maintenance, or just taking a break. Resume when you're ready.
Webhook events
Every schedule run produces webhook events, sent to the subscribers of the schedule's own workspace. Subscribe to them to know when runs start, complete, fail or are retried, and when a schedule is paused or resumed. The payload names the schedule (schedule_id, schedule_name), the run (run_id, attempt, max_attempts, status, mission_id) and, for a failure, a typed error.
| Event | When |
|---|---|
schedule.run.created | A fire made a new run (also Run now on a schedule) |
schedule.run.started | The run's execution was started |
schedule.run.completed | The execution ended and the run succeeded |
schedule.run.failed | The run failed and will not be retried (its last attempt) |
schedule.run.needs_human | A time came and the schedule needs a person: it only notifies (notify_only), or it waits for approval before each run |
schedule.run.retry_scheduled | An attempt failed and another is scheduled (retry_at says when) |
schedule.paused | The schedule stopped firing: a person paused it, or it was stopped (status says which, reason says why). paused_by is the person's id, or scheduler when Cadreen stopped it |
schedule.resumed | Schedule was resumed |