/** * Cron Engine — persistent scheduler with file-based storage. * Manages scheduled tasks with cron expressions, persists to ~/.opc/schedules.json, * and auto-recovers on startup. */ import type { JobHandler } from '../core/scheduler'; export interface ScheduleTask { id: string; name: string; schedule: string; description: string; frequency: 'daily' | 'weekly' | 'monthly' | 'custom'; time?: string; outputChannel: 'telegram' | 'email' | 'web'; enabled: boolean; createdAt: string; updatedAt: string; lastRun?: string; nextRun?: string; } export interface SchedulesStore { tasks: ScheduleTask[]; } /** Convert frequency + time to cron expression */ export declare function frequencyToCron(frequency: string, time?: string): string; export declare class CronEngine { private scheduler; private store; private handler; constructor(handler?: JobHandler); /** Initialize and recover persisted tasks */ start(): void; stop(): void; listTasks(): ScheduleTask[]; getTask(id: string): ScheduleTask | undefined; createTask(input: Omit): ScheduleTask; updateTask(id: string, updates: Partial): ScheduleTask | null; deleteTask(id: string): boolean; runTask(id: string): Promise; } //# sourceMappingURL=cron-engine.d.ts.map