/** * Five-field cron, resolved onto the one calculation a loop's pump needs. * * The fields are minute, hour, day of month, month and day of week (0–6 from * Sunday; 7 is accepted as Sunday, as Vixie cron does). A field takes `*`, a * number, a comma-separated list, an inclusive `a-b` range, and a `/step` after * `*`, a range or a number. Month and weekday names are not accepted: the * rejection message names the shapes that are, so a typo cannot be guessed at. * * The arithmetic runs in the machine's local zone through `Date`'s local-time * constructors, so `0 9 * * 1-5` means 09:00 on the wall wherever the loop runs, * including across a daylight-saving transition (ADR-0006). * * @author mystery4f <40482524+mystery4f@users.noreply.github.com> */ /** A parsed cron expression: the one call the schedule seam needs. */ export interface CronSchedule { /** Epoch milliseconds of the first fire strictly after `after`, or null when none follows. */ nextFire(after: number): number | null; } /** * Parses a five-field cron expression. Returns undefined for anything else — * the wrong number of fields, an out-of-range value, a scrambled range, a named * day — and leaves the wording of the complaint to the caller. */ export declare function parseCron(expression: string): CronSchedule | undefined;