Cron parser
Explain a cron expression and preview its next runs
Which dialect this is
The base is Vixie cron — the crontab(5) on Linux and macOS, and the same semantics a Kubernetes CronJob schedule uses: minute hour day-of-month month day-of-week, with *, steps, ranges, lists and three-letter month and day names.
Two common extensions are accepted on top: a leading sixth field read as seconds (Quartz and Spring's @Scheduled; plain Unix cron has no seconds field), and the @yearly @annually @monthly @weekly @daily @midnight @hourly macros. Two Quartz tokens are also accepted: ? in either day field, read as *, and L in day-of-month for the last day of the month.
Not supported, and reported as an error rather than guessed at: Quartz's seventh year field, W (nearest weekday), L in day-of-week (last Friday of the month), # (nth weekday of the month), calendar offsets, and @reboot, which is an event and has no next run.
The classic trap: when both day-of-month and day-of-week are restricted, Unix cron ORs them — 0 0 1 * MON runs on the 1st and on every Monday. When either field starts with * the two are ANDed instead. Vixie decides that on the field's first character alone, so a step written with a leading star still counts as a star for the rule. Quartz refuses the ambiguity and requires ? in one of the two.