← 返回
未分类 中文

Cron Delivery Fix

Diagnose and fix OpenClaw cron job delivery failures. Script-based approach to prevent manual config errors. Fixes silent delivery failures, missing delivery...
诊断并修复 OpenClaw cron任务投递失败。脚本化方案防止手动配置错误。修复静默投递失败和投递缺失。
shimonxin
未分类 clawhub v1.0.1 1 版本 99516.9 Key: 无需
★ 0
Stars
📥 206
下载
💾 0
安装
1
版本
#latest

概述

Cron Delivery Fix

Diagnose and fix OpenClaw cron job message delivery failures. Uses scripted operations to prevent manual configuration errors.

Trigger Conditions

  • User reports "didn't receive scheduled task message"
  • Cron status shows delivered but user didn't receive it
  • Cron status shows not-delivered
  • Need to batch-check/fix all cron delivery configs

Core Lessons (Historical Incident Log)

This issue recurred on multiple dates. Each manual fix introduced new problems:

  1. Session context: Isolated session cron jobs lack contextToken, causing silent message failures
  2. Missing params: Some tasks were missing to/channel/accountId, resulting in incomplete delivery
  3. Config wipe: Manual --no-deliver accidentally cleared delivery configs; wrong --session caused invalid combinations

Root cause: Manually running openclaw cron edit one by one easily misses parameters or creates illegal configs.

Solution: Use scripts for unified management. Never manually edit cron session/delivery fields.

Delivery Config Specification

Valid Config Combinations

sessionTargetpayload.kinddelivery.modeDescription
------------
isolatedagentTurnannounceAI executes + cron auto-delivers summary (requires complete to/channel/accountId)
isolatedagentTurnnoneAI self-delivers via message tool (must include send params in prompt)
mainsystemEventnoneTriggers in main session (no independent delivery)

Invalid Configurations

CombinationError Reason
------
main + agentTurnGateway rejects: main cron jobs require payload.kind="systemEvent"
announce + missing toNo delivery target, message cannot be sent
announce + missing accountIdMulti-account setups deliver to wrong account
none + agent in isolated sessionAI's message tool lacks contextToken in isolated session

Standard Template for Delivery Tasks

All cron jobs that need to send messages to users must have:

sessionTarget: isolated
payload.kind: agentTurn
delivery.mode: announce
delivery.channel: <your-channel-id>
delivery.to: <your-user-id>
delivery.accountId: <your-account-id>

Standard Template for Silent Tasks

Tasks that don't need to send messages:

sessionTarget: isolated
payload.kind: agentTurn
delivery.mode: none

Operation Flow

Step 1: Diagnose

bash skills/cron-delivery-fix/scripts/diagnose.sh

Outputs delivery status of all cron jobs, flagging problematic ones.

Step 2: Fix

# Fix a single job
bash skills/cron-delivery-fix/scripts/fix-single.sh <job-id> [--announce|--silent]

# Fix all delivery-type jobs
bash skills/cron-delivery-fix/scripts/fix-all.sh

# Restore a broken job (with valid config)
bash skills/cron-delivery-fix/scripts/restore.sh <job-id>

Step 3: Verify

# Run diagnosis again to confirm no issues
bash skills/cron-delivery-fix/scripts/diagnose.sh

# Manual trigger test
openclaw cron run <job-id>

Prohibited Operations

  1. Never manually use openclaw cron edit --session main on agentTurn-type tasks
  2. Never use --no-deliver to clear delivery config then re-add params one by one (easy to miss params)
  3. Never modify cron config without validating the combination is legal
  4. Never fix cron without running diagnose.sh to verify afterwards

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-05-26 18:18 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

微信公众号发布

shimonxin
微信公众号文章发布技能。当用户提到发布公众号文章、推送公众号、公众号发文、将文章发布到公众号、将 Markdown 转成公众号格式,或需要发布带 YAML frontmatter 的 Markdown 文件到公众号时激活。功能包括Markd
★ 0 📥 284

Markdown to PDF (CJK)

shimonxin
Markdown 转 PDF 转换器,支持中日韩(CJK)语言。使用 WeasyPrint + Noto CJK 字体实现精准渲染。功能:表情符号替换、自定义...
★ 0 📥 262

IMAP Mailbox

shimonxin
通过IMAP协议读取和管理邮件;列出、阅读、搜索并下载邮件附件;支持每日简报摘要模式;触发器:检查邮件
★ 0 📥 254