/** * File Organizer MCP Server v3.4.2 * Cron Utility Functions * * Utilities for parsing cron expressions and calculating run times. * Supports common cron patterns (hourly, daily, weekly) with fallback * heuristics for complex patterns. */ /** * Calculate the next run time from a given date based on a cron expression * @param cronExpression - The cron expression * @param fromDate - The date to calculate from (defaults to now) * @returns The next scheduled run time */ export declare function getNextRunTime(cronExpression: string, fromDate?: Date): Date; /** * Calculate the previous run time before a given date based on a cron expression * @param cronExpression - The cron expression * @param fromDate - The date to calculate from (defaults to now) * @returns The most recent scheduled run time before fromDate */ export declare function getPreviousRunTime(cronExpression: string, fromDate?: Date): Date; /** * Determine if a catchup run is needed based on the cron schedule and last run time * @param cronExpression - The cron expression * @param lastRunTime - The last successful run time (null if never ran) * @param currentTime - The current time (defaults to now) * @returns true if catchup is needed, false otherwise */ export declare function shouldCatchup(cronExpression: string, lastRunTime: Date | null, currentTime?: Date): boolean; /** * Calculate time until next run in milliseconds * @param cronExpression - The cron expression * @param fromDate - The date to calculate from (defaults to now) * @returns Milliseconds until next run (0 if should have run already) */ export declare function getTimeUntilNextRun(cronExpression: string, fromDate?: Date): number; /** * Check if a cron expression is valid * @param expression - The cron expression to validate * @returns true if valid, false otherwise */ export declare function isValidCronExpression(expression: string): boolean; //# sourceMappingURL=cron-utils.d.ts.map