/** * Cron expression utilities for scheduling */ export interface CronParts { minute: string; hour: string; dayOfMonth: string; month: string; dayOfWeek: string; } export interface ParsedCronField { type: 'all' | 'specific' | 'range' | 'step' | 'list'; values: number[]; } /** * Parse a cron expression into its parts * @param expression - cron expression (5 fields: minute hour dayOfMonth month dayOfWeek) */ export declare function parseCronExpression(expression: string): CronParts | null; /** * Parse a cron field into its numeric values * @param field - cron field string (e.g., "star/5", "1-5", "1,2,3", "*") * @param min - minimum valid value * @param max - maximum valid value */ export declare function parseCronField(field: string, min: number, max: number): ParsedCronField | null; /** * Check if a date matches a cron expression * @param date - date to check * @param expression - cron expression */ export declare function matchesCron(date: Date, expression: string): boolean; /** * Get the next date that matches a cron expression * @param expression - cron expression * @param after - start searching after this date (default: now) * @param maxIterations - maximum iterations to prevent infinite loops */ export declare function getNextCronDate(expression: string, after?: Date, maxIterations?: number): Date | null; /** * Get the N next dates that match a cron expression * @param expression - cron expression * @param count - number of dates to get * @param after - start searching after this date */ export declare function getNextCronDates(expression: string, count: number, after?: Date): Date[]; /** * Get the previous date that matched a cron expression * @param expression - cron expression * @param before - start searching before this date * @param maxIterations - maximum iterations to prevent infinite loops */ export declare function getPreviousCronDate(expression: string, before?: Date, maxIterations?: number): Date | null; /** * Validate a cron expression * @param expression - cron expression to validate */ export declare function isValidCron(expression: string): boolean; /** * Convert a cron expression to a human-readable description * @param expression - cron expression */ export declare function describeCron(expression: string): string | null; /** * Common cron expressions */ export declare const CRON_PRESETS: { readonly everyMinute: "* * * * *"; readonly everyHour: "0 * * * *"; readonly everyDay: "0 0 * * *"; readonly everyDayAt9am: "0 9 * * *"; readonly everyDayAt6pm: "0 18 * * *"; readonly everyWeek: "0 0 * * 0"; readonly everyMonth: "0 0 1 * *"; readonly everyYear: "0 0 1 1 *"; readonly weekdays: "0 0 * * 1-5"; readonly weekends: "0 0 * * 0,6"; readonly every5Minutes: "*/5 * * * *"; readonly every15Minutes: "*/15 * * * *"; readonly every30Minutes: "*/30 * * * *"; }; //# sourceMappingURL=cron.d.ts.map