Skip to content
CookDex docs

Scheduling and automations

Tasks run on a schedule, or as steps of an automation, which runs several tasks in order. Both are set up in the web UI. For routine monitoring, schedule data-maintenance with Preview Run enabled, or schedule health-check for a read-only report.

Schedule kinds:

Kind Required fields Notes
interval seconds Runs repeatedly. Optional start_at, end_at, and run_if_missed values are stored in UTC.
once run_at Runs one time in the future. Optional run_if_missed controls restored missed runs.
calendar every (day or week), time (HH:MM), weekday (0 = Sunday), timezone A wall-clock time in a time zone, so it follows daylight saving. Used by automations.

The web UI stores schedules through its API (POST /schedules), relative to /cookdex/api/v1 by default, or your WEB_BASE_PATH. POST /schedules accepts interval and once schedules; calendar schedules are made by automations.

An automation is an ordered list of steps (a task and its options) with settings for the whole run and a trigger. It’s stored by the web UI and run by the hidden workflow task (python -m cookdex.workflow_runner), which builds every step up front, then runs them one after another in a single run with one log and one set of results.

Field Values Notes
steps 1 to 12 {task_id, options} Options are the task’s own, without dry_run, backup_first or apply_cleanups; those come from the automation.
mode preview, apply Preview runs every step as a dry run.
backup_first boolean With apply, one pre-change backup is made before the first step instead of one per step.
stop_on_error boolean Stop at the first step that fails, or carry on with the rest.
trigger manual, calendar (every: day/week, time, weekday 0 = Sunday, timezone), interval (seconds, start_at), once (run_at) Enabled automations with a time-based trigger own one schedule for the workflow task. Calendar triggers keep their wall-clock time across daylight-saving changes.

Four ready-made automations ship switched off. Plain task schedules, including older ones and ones made through POST /schedules, are turned into one-step automations with the same timing, options and approval.