@@ -23,7 +23,7 @@ cron is the mechanism.
2323- Jobs persist under ` ~/.openclaw/cron/ ` so restarts don’t lose schedules.
2424- Two execution styles:
2525 - ** Main session** : enqueue a system event, then run on the next heartbeat.
26- - ** Isolated** : run a dedicated agent turn in ` cron:<jobId> ` , optionally deliver output.
26+ - ** Isolated** : run a dedicated agent turn in ` cron:<jobId> ` , with a delivery mode (legacy summary, announce, full output, or none) .
2727- Wakeups are first-class: a job can request “wake now” vs “next heartbeat”.
2828
2929## Quick start (actionable)
@@ -53,7 +53,7 @@ openclaw cron add \
5353 --tz " America/Los_Angeles" \
5454 --session isolated \
5555 --message " Summarize overnight updates." \
56- --deliver \
56+ --announce \
5757 --channel slack \
5858 --to " channel:C1234567890"
5959```
@@ -96,7 +96,7 @@ A cron job is a stored record with:
9696
9797- a ** schedule** (when it should run),
9898- a ** payload** (what it should do),
99- - optional ** delivery** (where output should be sent ).
99+ - optional ** delivery mode ** (announce, full output, or none ).
100100- optional ** agent binding** (` agentId ` ): run the job under a specific agent; if
101101 missing or unknown, the gateway falls back to the default agent.
102102
@@ -136,9 +136,12 @@ Key behaviors:
136136
137137- Prompt is prefixed with ` [cron:<jobId> <job name>] ` for traceability.
138138- Each run starts a ** fresh session id** (no prior conversation carry-over).
139- - A summary is posted to the main session (prefix ` Cron ` , configurable).
140- - ` wakeMode: "now" ` triggers an immediate heartbeat after posting the summary.
141- - If ` payload.deliver: true ` , output is delivered to a channel; otherwise it stays internal.
139+ - Legacy behavior (no ` delivery ` field): a summary is posted to the main session (prefix ` Cron ` , configurable).
140+ - ` delivery.mode ` (isolated-only) chooses what happens instead of the legacy summary:
141+ - ` announce ` : subagent-style summary delivered immediately to a chat.
142+ - ` deliver ` : full agent output delivered immediately to a chat.
143+ - ` none ` : internal only (no main summary, no delivery).
144+ - ` wakeMode: "now" ` triggers an immediate heartbeat after posting the ** legacy** summary.
142145
143146Use isolated jobs for noisy, frequent, or "background chores" that shouldn't spam
144147your main chat history.
@@ -155,17 +158,29 @@ Common `agentTurn` fields:
155158- ` message ` : required text prompt.
156159- ` model ` / ` thinking ` : optional overrides (see below).
157160- ` timeoutSeconds ` : optional timeout override.
158- - ` deliver ` : ` true ` to send output to a channel target.
159- - ` channel ` : ` last ` or a specific channel.
160- - ` to ` : channel-specific target (phone/chat/channel id).
161- - ` bestEffortDeliver ` : avoid failing the job if delivery fails.
161+
162+ Delivery config (isolated jobs only):
163+
164+ - ` delivery.mode ` : ` none ` | ` announce ` | ` deliver ` .
165+ - ` delivery.channel ` : ` last ` or a specific channel.
166+ - ` delivery.to ` : channel-specific target (phone/chat/channel id).
167+ - ` delivery.bestEffort ` : avoid failing the job if delivery fails (deliver mode).
168+
169+ Legacy delivery fields (still accepted when ` delivery ` is omitted):
170+
171+ - ` payload.deliver ` : ` true ` to send output to a channel target.
172+ - ` payload.channel ` : ` last ` or a specific channel.
173+ - ` payload.to ` : channel-specific target (phone/chat/channel id).
174+ - ` payload.bestEffortDeliver ` : avoid failing the job if delivery fails.
162175
163176Isolation options (only for ` session=isolated ` ):
164177
165178- ` postToMainPrefix ` (CLI: ` --post-prefix ` ): prefix for the system event in main.
166179- ` postToMainMode ` : ` summary ` (default) or ` full ` .
167180- ` postToMainMaxChars ` : max chars when ` postToMainMode=full ` (default 8000).
168181
182+ Note: isolation post-to-main settings apply to legacy jobs (no ` delivery ` field). If ` delivery ` is set, the legacy summary is skipped.
183+
169184### Model and thinking overrides
170185
171186Isolated jobs (` agentTurn ` ) can override the model and thinking level:
@@ -185,19 +200,24 @@ Resolution priority:
185200
186201### Delivery (channel + target)
187202
188- Isolated jobs can deliver output to a channel. The job payload can specify :
203+ Isolated jobs can deliver output to a channel via the top-level ` delivery ` config :
189204
190- - ` channel ` : ` whatsapp ` / ` telegram ` / ` discord ` / ` slack ` / ` mattermost ` (plugin) / ` signal ` / ` imessage ` / ` last `
191- - ` to ` : channel-specific recipient target
205+ - ` delivery.mode ` : ` announce ` (subagent-style summary) or ` deliver ` (full output).
206+ - ` delivery.channel ` : ` whatsapp ` / ` telegram ` / ` discord ` / ` slack ` / ` mattermost ` (plugin) / ` signal ` / ` imessage ` / ` last ` .
207+ - ` delivery.to ` : channel-specific recipient target.
192208
193- If ` channel ` or ` to ` is omitted, cron can fall back to the main session’s “last route”
194- (the last place the agent replied).
209+ Delivery config is only valid for isolated jobs (` sessionTarget: "isolated" ` ).
195210
196- Delivery notes:
211+ If ` delivery.channel ` or ` delivery.to ` is omitted, cron can fall back to the main session’s
212+ “last route” (the last place the agent replied).
197213
198- - If ` to ` is set, cron auto-delivers the agent’s final output even if ` deliver ` is omitted.
199- - Use ` deliver: true ` when you want last-route delivery without an explicit ` to ` .
200- - Use ` deliver: false ` to keep output internal even if a ` to ` is present.
214+ Legacy behavior (no ` delivery ` field):
215+
216+ - If ` payload.to ` is set, cron auto-delivers the agent’s final output even if ` payload.deliver ` is omitted.
217+ - Use ` payload.deliver: true ` when you want last-route delivery without an explicit ` to ` .
218+ - Use ` payload.deliver: false ` to keep output internal even if a ` to ` is present.
219+
220+ If ` delivery ` is set, it overrides legacy payload delivery fields and skips the legacy main-session summary.
201221
202222Target format reminders:
203223
@@ -248,13 +268,14 @@ Recurring, isolated job with delivery:
248268 "wakeMode" : " next-heartbeat" ,
249269 "payload" : {
250270 "kind" : " agentTurn" ,
251- "message" : " Summarize overnight updates." ,
252- "deliver" : true ,
271+ "message" : " Summarize overnight updates."
272+ },
273+ "delivery" : {
274+ "mode" : " announce" ,
253275 "channel" : " slack" ,
254276 "to" : " channel:C1234567890" ,
255- "bestEffortDeliver" : true
256- },
257- "isolation" : { "postToMainPrefix" : " Cron" , "postToMainMode" : " summary" }
277+ "bestEffort" : true
278+ }
258279}
259280```
260281
@@ -263,7 +284,7 @@ Notes:
263284- ` schedule.kind ` : ` at ` (` atMs ` ), ` every ` (` everyMs ` ), or ` cron ` (` expr ` , optional ` tz ` ).
264285- ` atMs ` and ` everyMs ` are epoch milliseconds.
265286- ` sessionTarget ` must be ` "main" ` or ` "isolated" ` and must match ` payload.kind ` .
266- - Optional fields: ` agentId ` , ` description ` , ` enabled ` , ` deleteAfterRun ` , ` isolation ` .
287+ - Optional fields: ` agentId ` , ` description ` , ` enabled ` , ` deleteAfterRun ` , ` delivery ` , ` isolation ` .
267288- ` wakeMode ` defaults to ` "next-heartbeat" ` when omitted.
268289
269290### cron.update params
@@ -341,7 +362,7 @@ openclaw cron add \
341362 --wake now
342363```
343364
344- Recurring isolated job (deliver to WhatsApp):
365+ Recurring isolated job (announce to WhatsApp):
345366
346367``` bash
347368openclaw cron add \
@@ -350,7 +371,7 @@ openclaw cron add \
350371 --tz " America/Los_Angeles" \
351372 --session isolated \
352373 --message " Summarize inbox + calendar for today." \
353- --deliver \
374+ --announce \
354375 --channel whatsapp \
355376 --to " +15551234567"
356377```
0 commit comments