/** * Schedule expression parsing and next-run-time computation. * * Supports two formats: * - **Interval shorthand**: `""` where unit is s/m/h/d (min 10s) * - **Cron expressions**: Standard 5-field cron syntax via `cron-parser` */ /** * Parse an interval shorthand expression to milliseconds. * * @param expr - e.g. "30s", "5m", "1h", "1d" * @returns Duration in milliseconds * @throws If the expression is invalid or below the minimum (10s) */ export declare function parseDuration(expr: string): number; /** * Detect whether an expression is interval shorthand (vs. cron). * * @param expr - Schedule expression string * @returns true if the expression matches interval shorthand format */ export declare function isIntervalExpression(expr: string): boolean; /** * Compute the next run time for a schedule expression. * * For intervals: if `lastRunAt + interval` is in the future, use that (prevents * drift). Otherwise use `now + interval` (prevents burst-firing after downtime). * * For cron: next occurrence after now. * * @param expr - Schedule expression (interval or cron) * @param lastRunAt - ISO timestamp of the last fire (undefined for first fire) * @returns ISO timestamp of the next fire */ export declare function computeNextRunAt(expr: string, lastRunAt?: string): string; /** * Validate a schedule expression. Throws if invalid. * * @param expr - Schedule expression to validate * @throws If the expression is neither valid interval shorthand nor valid cron */ export declare function validateExpression(expr: string): void; //# sourceMappingURL=schedule-expression.d.ts.map