@hotmeshio/hotmesh
Version:
Serverless Workflow
13 lines (12 loc) • 498 B
TypeScript
import { ILogger } from '../../../types/logger';
/**
* Safely calculates the delay in seconds until the next execution of a cron job.
* Fails silently and returns -1 if the cron expression is invalid.
* @param cronExpression The cron expression to parse (e.g. '0 0 * * *').
* @returns The delay in seconds until the next cron job execution (minimum 5 seconds).
*/
declare class CronHandler {
static logger: ILogger;
nextDelay(cronExpression: string): number;
}
export { CronHandler };