From e9c937684c1aa414c8ee1de45d98256d53dbc038 Mon Sep 17 00:00:00 2001 From: Claw Date: Fri, 6 Mar 2026 02:07:46 +0000 Subject: [PATCH] fix: cron agents launch searcher/applier detached (nohup &) to prevent SIGTERM on session end --- setup.mjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.mjs b/setup.mjs index 0f091d3..e573a01 100644 --- a/setup.mjs +++ b/setup.mjs @@ -111,8 +111,8 @@ async function main() { schedule: { kind: 'cron', expr: searchSchedule, tz: settings.timezone || 'America/Los_Angeles' }, payload: { kind: 'agentTurn', - message: `Run the claw-apply job searcher: \`cd ${__dir} && node job_searcher.mjs 2>&1\`. Report how many new jobs were found.`, - timeoutSeconds: 0, + message: `Launch the claw-apply job searcher as a detached background process: \`cd ${__dir} && nohup node job_searcher.mjs >> /tmp/claw-searcher.log 2>&1 & echo $!\`. Confirm the PID and that it started successfully.`, + timeoutSeconds: 30, }, delivery: { mode: 'announce', to: telegramUserId }, sessionTarget: 'isolated', @@ -124,8 +124,8 @@ async function main() { schedule: { kind: 'cron', expr: applySchedule, tz: settings.timezone || 'America/Los_Angeles' }, payload: { kind: 'agentTurn', - message: `Run the claw-apply job applier: \`cd ${__dir} && node job_applier.mjs 2>&1\`. Report results.`, - timeoutSeconds: 0, + message: `Launch the claw-apply job applier as a detached background process: \`cd ${__dir} && nohup node job_applier.mjs >> /tmp/claw-applier.log 2>&1 & echo $!\`. Confirm the PID and that it started successfully.`, + timeoutSeconds: 30, }, delivery: { mode: 'announce', to: telegramUserId }, sessionTarget: 'isolated',