Skip to main content

Module schedule

Module schedule 

Source
Available on crate feature schedule only.
Expand description

faucet schedule — built-in cron scheduler.

The runtime loop lives in crate::commands::schedule; this module holds the pure, unit-tested pieces it drives: the config types (spec), the validated/compiled schedule (compiled — added in Task 3), the decision state machine (state — added in Task 4), and the metric emitters (metrics — added in Task 5).

Modules§

compiled
Validated, compiled form of a ScheduleSpec: the parsed cron + timezone plus the numeric knobs. next_after is pure (no wall clock) and is the single source of truth for “when does the next run fire”.
metrics
Scheduler metrics, emitted via the metrics facade. pipeline is the only label (low cardinality); per-row outcomes are covered by the pipeline-run metrics in faucet-core. No-ops when no recorder is installed.
spec
Config types for the schedule: block.
state
The scheduler’s decision state machine. Pure — no clock, no tasks, no IO — so every overlap / failure / cap transition is unit-tested deterministically.