Skip to content

A cleared schedule means not scheduled, and every reader says so

A schedule is invisible until it fires or fails to, so the component that decides a trigger is due and the one that reports when it will next run never describe the same stored value differently. Blank-means-inactive is the reading every comparable scheduler uses.

The rule

Normative: this is the rule
  1. A trigger whose cron expression is the empty string is not scheduled.
  2. It MUST NOT fire.
  3. A report of when it will next run MUST say it has none.
  4. Empty means exactly empty: an expression that merely looks unfilled, such as 0, is a malformed expression and MUST be reported as invalid rather than as unset, so an operator is never told to fill in a field that is already filled in.
  5. Whichever component decides that a trigger is due and whichever reports its next run MUST reach the same conclusion about the same stored schedule.

What it means

A cleared schedule expression is not special-cased on the way in — it is a stored value like any other, and the component that decides a trigger is due and the component that reports its next run read that value the same way. Both treat a blank expression as "not scheduled," never as a schedule that fires on every pass.

The clause that a careful reader misses is the second one: "blank" means exactly blank. An expression that only looks unfilled, such as a single 0, is a real schedule expression the parser rejects, not an absent one. Reporting it as absent tells whoever is debugging a dead trigger to go fill in a field that already holds a character.

Example

The same missing next run, reported for two different stored expressions:

The reported code for a cleared expressionunset
"NO_EXPRESSION"
The reported code for a stored expression of a single zeromalformed
"INVALID_EXPRESSION"

Why

Recorded under OPEN-25.

Rule identifiers are permanent and are never renumbered. Each implementation publishes its own standing against these rules; this specification does not.spec 1.0 · CRON-1 · changed in spec 1.0