073-cron-jobs-missing-timeouts.sql
1 -- Migration 073: Add timeout_seconds to function-type cron jobs missing them 2 -- These were missed in migration 072. Without timeouts, function-type handlers 3 -- can run indefinitely and cause the cron service to hit its 10-min TimeoutStartSec. 4 5 -- vacuumDatabase / backupDatabase: SQLite VACUUM on a large DB can take minutes 6 UPDATE cron_jobs SET timeout_seconds = 300 WHERE task_key = 'vacuumDatabase'; 7 UPDATE cron_jobs SET timeout_seconds = 120 WHERE task_key = 'backupDatabase'; 8 9 -- Monitoring jobs: should be fast; cap at 2min 10 UPDATE cron_jobs SET timeout_seconds = 120 WHERE task_key IN ( 11 'pipelineStatusMonitor','monitorSystem','sonnetOverseer' 12 ); 13 14 -- Maintenance jobs: allow up to 3min 15 UPDATE cron_jobs SET timeout_seconds = 180 WHERE task_key IN ( 16 'diskCleanup','cleanupTestDbs','rotateLogs' 17 );