Skip to main content

Module expr

Module expr 

Source
Expand description

Standard 5-field cron (“min hour dom mon dow”, as the Schedule tool documents it) read with the cron crate, which wants a seconds field first and numbers the days of the week 1 = Sunday … 7 = Saturday. In standard cron 0 and 7 are Sunday and 1 is Monday, so the expression is translated here, at parse time only: a job’s stored expression stays the standard one it was written in. Every parse of a job’s expression goes through parse.

Functions§

parse
to_crate_expr, parsed.
to_crate_expr
five_field, a standard 5-field cron expression, as the cron crate’s expression: a 0 seconds field first, and a numeric day-of-week field in the crate’s numbering. Names (MON-FRI, SUN), * and ? are kept as they are. Ranges may wrap (5-1 is Friday to Monday).