2026-06-27 08:10:40 +05:30
|
|
|
/**
|
2026-06-29 11:35:56 +05:30
|
|
|
* @fileoverview Input shape for creating/updating a cron job. This is the
|
|
|
|
|
* user-settable subset of `CronJob` (server-maintained bookkeeping fields
|
2026-06-27 08:10:40 +05:30
|
|
|
* such as nextRunAt / lastStatus are excluded). Produced by the zod schema.
|
|
|
|
|
*/
|
|
|
|
|
|
2026-06-29 11:35:56 +05:30
|
|
|
import type { ConcurrencyPolicy, InputMode, PromptMode, ScheduleType } from '../types/cron.js';
|
2026-06-27 08:10:40 +05:30
|
|
|
import type { SessionMode } from '../types/session.js';
|
|
|
|
|
|
2026-06-29 11:35:56 +05:30
|
|
|
export type { CronJob, CronJobRun, CronJobRunStatus, TriggerType } from '../types/cron.js';
|
2026-06-27 08:10:40 +05:30
|
|
|
|
2026-06-29 11:35:56 +05:30
|
|
|
export interface CronJobInput {
|
2026-06-27 08:10:40 +05:30
|
|
|
name: string;
|
|
|
|
|
agentType: SessionMode;
|
|
|
|
|
workingDir: string;
|
|
|
|
|
launchCommand?: string;
|
|
|
|
|
promptMode: PromptMode;
|
|
|
|
|
promptText?: string;
|
|
|
|
|
promptFilePath?: string;
|
|
|
|
|
inputMode: InputMode;
|
|
|
|
|
scheduleType: ScheduleType;
|
|
|
|
|
runAt?: number;
|
|
|
|
|
intervalMinutes?: number;
|
|
|
|
|
dailyTime?: string;
|
|
|
|
|
weeklyDays?: number[];
|
|
|
|
|
weeklyTime?: string;
|
|
|
|
|
enabled: boolean;
|
|
|
|
|
notes?: string;
|
|
|
|
|
concurrencyPolicy: ConcurrencyPolicy;
|
2026-07-12 19:25:42 +02:00
|
|
|
/** Default true. Ignored for 'once' schedules. */
|
|
|
|
|
autoClosePreviousSession?: boolean;
|
2026-06-27 08:10:40 +05:30
|
|
|
}
|