feat: add automatic task scheduling configuration for Windows and Linux

This commit is contained in:
2025-11-04 20:51:49 +01:00
parent c74b131ac6
commit 014beda152
6 changed files with 659 additions and 11 deletions

View File

@@ -31,6 +31,7 @@ export interface Config {
dryRun?: boolean; // NEW: Dry-run mode (simulate without executing)
queryDiversity?: ConfigQueryDiversity; // NEW: Multi-source query generation
dashboard?: ConfigDashboard; // NEW: Local web dashboard for monitoring and control
scheduling?: ConfigScheduling; // NEW: Automatic scheduler configuration (cron/Task Scheduler)
}
export interface ConfigSaveFingerprint {
@@ -195,3 +196,23 @@ export interface ConfigDashboard {
port?: number; // dashboard server port (default: 3000)
host?: string; // bind address (default: 127.0.0.1)
}
export interface ConfigScheduling {
enabled?: boolean; // enable automatic schedule configuration
type?: 'auto' | 'cron' | 'task-scheduler'; // auto-detect or force specific type
cron?: {
schedule?: string; // cron expression (default: "0 9 * * *")
workingDirectory?: string; // project root path (auto-detected if empty)
nodePath?: string; // path to node executable (auto-detected if empty)
logFile?: string; // optional log file path
user?: string; // optional specific user for crontab
};
taskScheduler?: {
taskName?: string; // task name in Windows Task Scheduler
schedule?: string; // time in 24h format (e.g., "09:00")
frequency?: 'daily' | 'weekly' | 'once'; // task frequency
workingDirectory?: string; // project root path (auto-detected if empty)
runAsUser?: boolean; // run under current user
highestPrivileges?: boolean; // request highest privileges
};
}