Minimal 5-field cron expression parser and matcher.
Supports fixed values and * wildcards for minute, hour, day-of-month,
month, and day-of-week (0–6, Sunday = 0). Fields are matched in the
timezone configured via config :kathikon, timezone: ....
Presets
Shorthand macros expand to standard cron expressions:
@hourly—0 * * * *@daily—0 0 * * *@midnight—0 0 * * *@weekly—0 0 * * 0@monthly—0 0 1 * *@yearly—0 0 1 1 *@annually—0 0 1 1 *
Presets are case-insensitive (@Daily = @daily).
Summary
Functions
Returns whether a cron expression is due at now, given the last fire time.
Expands preset macros to a canonical 5-field cron string.
Parses a cron expression.
Returns whether a cron expression is valid.
Types
Functions
@spec due?(String.t(), DateTime.t() | nil, DateTime.t()) :: boolean()
Returns whether a cron expression is due at now, given the last fire time.
Expands preset macros to a canonical 5-field cron string.
Returns the input unchanged when it is not a known preset.
Parses a cron expression.
Returns {:ok, parsed} or {:error, :invalid_cron}.
Returns whether a cron expression is valid.