/** * Result returned by a scheduled job handler. * * - `ok` — true on success, false on partial / soft failure * - `details` — arbitrary structured payload (counts, IDs) for observability */ export interface ScheduledJobResult { ok: boolean; details?: Record; } /** * A scheduled job is a cron-triggered idempotent unit of work. */ export interface ScheduledJob { /** Unique registry key — used by HTTP entry points to look up the handler. */ name: string; /** * Cron expression in standard 5-field syntax (minute hour dom month dow). * This is metadata only — the registry never schedules anything itself. */ cron: string; /** The async unit of work. Must be idempotent. */ handler: () => Promise; } /** * Register a scheduled job. Re-registering the same name overwrites the * previous entry (useful for tests; production code registers once at boot). */ export declare function registerScheduledJob(job: ScheduledJob): void; /** * Look up a registered job by name. Returns `undefined` if not registered. */ export declare function getScheduledJob(name: string): ScheduledJob | undefined; /** * List all registered jobs. Returns a snapshot array — mutating it does NOT * affect the registry. */ export declare function listScheduledJobs(): ScheduledJob[]; /** * Remove all registered jobs. Intended for tests; production code should not * call this. */ export declare function clearScheduledJobs(): void; //# sourceMappingURL=scheduler.d.ts.map