Skip to content

Cron schedule

A Cron schedule runs a Workflow on a time-based schedule (a cron expression + timezone), with a catch-up policy for runs missed while the process was down: skip (ignore them) or run-all (replay them, up to a bound).

Authored declaratively as a cron Trigger in a package:

#[trigger(on = "daily_report", cron = "0 9 * * *", timezone = "UTC")]
struct DailyReport;
  • Expression format: standard 5-field cron (minute hour day month weekday) with an optional leading seconds field (6-field, e.g. */3 * * * * * = every 3 seconds). Parsed by the croner crate with seconds-optional enabled; evaluated timezone-aware (CronEvaluator in cloacina-workflow).
  • Catch-up policy: skip or run-all (run-all is bounded by a max-catchup count).
  • Schedule dicts (Python): id, workflow_name, cron_expression, timezone, enabled, catchup_policy, next_run_at, last_run_at, created_at, updated_at.
  • Parity: Python packages can also declare cron triggers — @cloaca.trigger(on="...", cron="...", timezone="...") (added in CLOACI-T-0688; the reconciler routes cron-bearing triggers to the cron scheduler). Note cloacinactl package new offers a cron scaffold for Rust only — hand-author the decorator in a Python package.