Skip to main content

Module schedule

Module schedule 

Expand description

Schedules: runs started on a cron expression or a fixed interval.

A schedule is itself a Fusee workflow (type SCHEDULE_TYPE, ID fusee.schedule/<name>) built on durable timers, so there is no separate scheduler and schedules survive crashes like any workflow. Each run it starts has the workflow ID <name>@<scheduled time> (UTC, RFC 3339) and attaches to a run that already has that ID, so one scheduled time never fires twice, not even after a crash or a backfill over the same range.

  • Overlap rules: skip a time while the previous run is still running, buffer-one (run it when the previous one finishes; at most one waits), allow-all, or cancel-other (cancel the running one, then start).
  • Jitter: each start is delayed by a recorded random amount below jitter_ms.
  • Catch-up: after downtime, missed times within catchup_window_ms still start (subject to the overlap rule); older ones are skipped.
  • Pause and resume; backfill(from, to) starts every scheduled time in a past range; trigger starts one now.

The schedule workflow continues as new every 50 actions, so its journal stays small however long it runs.

Structs§

Cron
A parsed five-field cron expression.
FiredSpan
An exact arithmetic progression. Regular schedules retain one span even after millions of firings. Irregular firings can add further spans.
ScheduleSpec
When a schedule fires and what it starts.
ScheduleState
A schedule’s state; also its input after continuing as new.

Enums§

Command
A command sent to a schedule on CONTROL.
Overlap
What to do with a scheduled time while the previous run still runs.

Constants§

CONTROL
The signal schedules take commands on.
SCHEDULE_TYPE
The built-in workflow type that runs schedules.

Functions§

format_time
2026-11-09T02:00:00Z, with milliseconds when the time has them (2026-11-09T02:00:00.250Z).
is_builtin
The built-in workflow types: schedules, debounce and batch coordinators. Journal sampling (fusee export --sample) leaves them out.
register_builtins
Registers the built-in workflows.
run_id
The workflow ID of the run a schedule starts for scheduled time ms.
schedule_id
The workflow ID of a schedule.