mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 05:41:24 +00:00
fix: cron announce delivery path (#8540) (thanks @tyler6204)
This commit is contained in:
@@ -188,12 +188,15 @@ export async function executeJob(
|
||||
// Post a short summary back to the main session so the user sees
|
||||
// the cron result without opening the isolated session.
|
||||
const summaryText = res.summary?.trim();
|
||||
if (summaryText) {
|
||||
const deliveryMode = job.delivery?.mode ?? "announce";
|
||||
if (summaryText && deliveryMode !== "none") {
|
||||
const prefix = "Cron";
|
||||
const label =
|
||||
res.status === "error" ? `${prefix} (error): ${summaryText}` : `${prefix}: ${summaryText}`;
|
||||
state.deps.enqueueSystemEvent(label, { agentId: job.agentId });
|
||||
state.deps.requestHeartbeatNow({ reason: `cron:${job.id}` });
|
||||
if (job.wakeMode === "now") {
|
||||
state.deps.requestHeartbeatNow({ reason: `cron:${job.id}` });
|
||||
}
|
||||
}
|
||||
|
||||
if (res.status === "ok") {
|
||||
|
||||
Reference in New Issue
Block a user