/** * Test Scheduler — Schedule recurring test runs with cron expressions * * @example * ```yaml * schedule: * - name: "nightly regression" * cron: "0 2 * * *" * suite: tests/regression.yaml * notify: [slack, email] * ``` */ export interface ScheduleEntry { name: string; cron: string; suite: string; notify?: string[]; enabled?: boolean; timeout_ms?: number; env?: Record; tags?: string[]; } export interface ScheduleConfig { schedule: ScheduleEntry[]; defaults?: { timeout_ms?: number; notify?: string[]; env?: Record; }; } export interface ScheduleRun { name: string; suite: string; scheduledAt: string; startedAt?: string; completedAt?: string; status: 'pending' | 'running' | 'passed' | 'failed' | 'skipped' | 'timeout'; result?: { passed: number; failed: number; total: number; }; error?: string; notify?: string[]; } /** * Parse a cron field (supports *, N, and * /N). */ export declare function parseCronField(field: string, min: number, max: number): number[]; /** * Parse a 5-field cron expression. * Returns { minutes, hours, daysOfMonth, months, daysOfWeek }. */ export declare function parseCron(expr: string): { minutes: number[]; hours: number[]; daysOfMonth: number[]; months: number[]; daysOfWeek: number[]; } | null; /** * Check if a date matches a cron expression. */ export declare function matchesCron(expr: string, date: Date): boolean; /** * Get the next matching time for a cron expression after a given date. * Returns null if no match found within maxIterations minutes. */ export declare function nextCronMatch(expr: string, after: Date, maxIterations?: number): Date | null; /** * Validate a schedule configuration. */ export declare function validateSchedule(config: ScheduleConfig): string[]; /** * Get all schedule entries that should run at a given time. */ export declare function getDueEntries(config: ScheduleConfig, now: Date): ScheduleEntry[]; /** * Merge entry with defaults. */ export declare function resolveEntry(entry: ScheduleEntry, defaults?: ScheduleConfig['defaults']): ScheduleEntry; /** * Create a schedule run record. */ export declare function createRun(entry: ScheduleEntry): ScheduleRun; /** * Format schedule overview for display. */ export declare function formatSchedule(config: ScheduleConfig): string; /** * Format a schedule run for display. */ export declare function formatRun(run: ScheduleRun): string; //# sourceMappingURL=scheduler.d.ts.map