Expand description
THE CRON SEAM, expansion side: is this a calendar expression, and is that a zone?
§The seam exists because the implementation was temporary — and it has been replaced
The ruling that put cron in v1 said what rides underneath it: a third-party crate FIRST, and the user’s own implementation later. The later has arrived. What changed is the crate the two functions below call; what did not change is a single word an author writes or a single meaning a schedule has — which is what the seam was built to make possible, and this swap is the measurement that it did.
There are TWO halves of the seam in the workspace, one per crate, because the build order forbids
one: ingraph cannot reach this crate (it expands through the derive, which is built on it), so
the runtime’s own half lives in ingraph::drive. A swap touches both, and they are written to be
read together.
§What is underneath, and what it costs
cronp — no_std, no_alloc, and NO dependency at all in the configuration this asks for.
It parses into a bitset per field, takes its DIALECT as a type parameter, and refuses with a
ParseError carrying a byte Span. The dialect is
Vixie, whose own constants are exactly the pins this framework had been
stating by hand: five fields, no seconds, no year, and dom/dow the classic
Union.
It EVALUATES nothing, which is the property this half wants most: an expansion-time check that computed a next-due would be a check whose answer depended on the machine the build ran on. The previous crate had to be told to fall back to UTC for exactly that reason; there is now nothing to tell.
§What this half checks, and what it deliberately does not
The FIELDS, the EXPRESSION, and the zone’s NAME. It does not compute a next-due and it must not: the zone a schedule runs in is the one where the program RUNS, and expansion happens wherever the build happens. The zone name is checked separately, and only where this machine HAS a database to check it against.
§The refusal quotes the expression under a caret
The span is spent rather than the sentence alone. A reader is shown the text they wrote with the offending run marked, which is what a compiler diagnostic does and what the previous crate’s own rendering happened to give — so the swap is a strict keep rather than a trade.
Constants§
- FIELDS
- How many fields a cron expression has here: the classic five — minute, hour, day of month, month, day of week.
Functions§
- check
- Read
expressionas a calendar expression, andzoneas an IANA name where one was written.