/** * Simple cron scheduler — no external dependencies. * Supports cron expressions: star, star-slash-N, M-N, M,N for minute/hour/day/month/weekday. */ export interface CronJob { id: string; name: string; schedule: string; task: string; enabled: boolean; lastRun?: Date; nextRun?: Date; delivery?: { channel: string; chatId: string; threadId?: number; }; } type CronField = { type: 'any'; } | { type: 'every'; step: number; } | { type: 'list'; values: number[]; }; interface ParsedCron { minute: CronField; hour: CronField; dayOfMonth: CronField; month: CronField; dayOfWeek: CronField; } export declare function parseCron(expr: string): ParsedCron; export declare function cronMatches(parsed: ParsedCron, date: Date): boolean; export type JobHandler = (job: CronJob) => void | Promise; export declare class Scheduler { private jobs; private parsed; private timer; private handler; constructor(handler: JobHandler); addJob(job: CronJob): void; removeJob(id: string): void; enableJob(id: string): void; disableJob(id: string): void; getJobs(): CronJob[]; getJob(id: string): CronJob | undefined; /** Run a specific job immediately */ runJob(id: string): Promise; start(): void; stop(): void; private tick; } export {}; //# sourceMappingURL=scheduler.d.ts.map