← Back to library

修复 Cron 在跨渠道活跃会话下的 `target is missing` 投递失败

适用于“同一主会话同时使用 Telegram/WhatsApp 时,定时任务偶发不回传结果”的场景:通过显式 `delivery.to` 与渠道一致性检查,避免 announce 阶段静默失败。

GITHUBDiscovered 2026-02-12Author PauloLuan
Prerequisites
  • Cron jobs are configured with `delivery.mode: announce` and you can edit job payloads.
  • The same assistant has active conversations across at least two channels (e.g., Telegram + WhatsApp).
Steps
  1. List affected jobs and find those with `delivery.channel` set but no explicit `delivery.to`.
  2. For each job, add a channel-correct `delivery.to` target instead of relying on session `lastTo` fallback.
  3. Trigger a manual run after switching active channel context (e.g., chat on WhatsApp, then run Telegram job).
  4. Review run history and keep a warning rule for repeated delivery errors.
Commands
openclaw cron list
openclaw cron runs --job <jobId>
openclaw cron run --job <jobId>
Verify

Cron agent output is announced to the intended channel even when another channel was the most recent active chat.

Caveats
  • Without explicit `delivery.to`, cross-channel sessions can still resolve to the wrong address or fail(需验证).
  • Do not copy personal identifiers between channels unless consent and compliance are clear.
Source attribution

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

Open original source ↗
Visit original post