← Back to library

Cron announce 去重:避免 isolated 作业向同一渠道发送双消息

场景:isolated agentTurn + delivery.mode=announce 时,作业结果可能被发送两次(一次来自 isolated 结果,一次来自 main session 唤醒)。该修复通过 delivered 标记阻止重复派发。

GITHUBDiscovered 2026-02-14Author widingmarcus-cyber
Prerequisites
  • OpenClaw version includes PR #15739 (or a later release containing it).
  • You can create isolated cron jobs with delivery.mode=announce.
Steps
  1. Create a reproducible test job using isolated agentTurn + announce mode, and run it once before upgrade to capture baseline behavior.
  2. Upgrade to build containing PR #15739 and restart gateway cleanly.
  3. Run the same cron job 3-5 times (including `cron run` manual trigger and scheduled trigger).
  4. Compare run history with target channel output; each run should map to exactly one delivered message.
Commands
openclaw gateway status
openclaw gateway restart
openclaw cron run <jobId>
openclaw cron runs <jobId>
openclaw logs --local-time
Verify

For each run id, exactly one outbound announce message appears; no extra main-session duplicate is generated.

Caveats
  • If channel plugins retry on provider/network errors, apparent duplicates may still occur outside cron logic(需验证).
  • Do not mix this check with multi-recipient broadcast jobs; validate single target first.
Source attribution

This tip is aggregated from community/public sources and preserved with attribution.

Open original source ↗
Visit original post