惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - xgqfrms

Dell 显示器 S2419HM 灰屏 &花屏 All In One AI Harness Engineering All In One 电脑外接显示器天梯榜 All In One How to change the speed display unit of GSP from mph to km/h using GoPro Labs All In One WHCA 白宫记者协会 All In One Pascal Editor All In One 主流犬种图解指南 All In One 泡沫喷雾 & 辣椒喷雾 All In One 如何给身份证照片添加水印 All In One GoPro MISSION 1 PRO price All In One 杭州历史天气数据 All In One Pandoc All In One GoPro MISSION 1 SERIES All In One GoPro telemetry 中的 GPS5 与 GPS9 是什么 All In One NHTSA FARS All In One How to extract raw telemetry data from GoPro videos using FFmpeg All In One Free Vercel Services All In One How to run for loop in Python REPL All In One 使用不同 AI 大模型生成一杯装满的红酒的高脚杯挑战赛 All In One CSS Custom Highlight API All In One OpenCode All In One free MongoDB Cloud API All In One 如何在 Raspberry Pi 安装 OpenClaw All In One free cloud LLM models API All In One Claude Code Free Video Tutorials All In One 如何解决 OpenClaw 升级后导致 feishu plugin 无法使用的问题 All In One Claude Code skills & plugins All In One LLM Benchmark All In One How to fix use the FileZilla FTP upload file error All In One
OpenClaw 设置 cron 定时任务 All In One
xgqfrms · 2026-03-28 · via 博客园 - xgqfrms

OpenClaw 设置 cron 定时任务 All In One

feishu weather bot

errors

问题原因
shanghai-weather-daily 任务确实配置了,但连续失败了 3 次,错误信息:
Delivering to Feishu requires target <chatId|user:openId|chat:chatId>

问题根源
任务的 delivery.channel 设置为 "last",但在 Feishu 中需要一个明确的目标聊天 ID。当前配置无法解析到正确的接收目标

修复方案
需要修改 cron 任务配置,指定明确的 Feishu 聊天 ID。有两个选项:

image

cron (Gateway)

$ openclaw cron --help

🦞 OpenClaw 2026.3.23-2 (7ffe7e4) — I've read more man pages than any human should—so you don't have to.

Usage: openclaw cron [options] [command]

Manage cron jobs (via Gateway)

Options:
  -h, --help  Display help for command

Commands:
  add         Add a cron job
  disable     Disable a cron job
  edit        Edit a cron job (patch fields)
  enable      Enable a cron job
  help        Display help for command
  list        List cron jobs
  rm          Remove a cron job
  run         Run a cron job now (debug)
  runs        Show cron run history (JSONL-backed)
  status      Show cron scheduler status

Docs: docs.openclaw.ai/cli/cron
Upgrade tip: run `openclaw doctor --fix` to normalize legacy cron job storage.

$ openclaw cron run <job-id>
$ openclaw cron runs --id <job-id>

image

$ openclaw cron list
ID                                   Name                     Schedule                         Next       Last       Status    Target    Agent ID   Model               
4c382689-4059-442d-b942-d54aea6b6802 shanghai-weather-daily   cron 0 8 * * * @ Asia/Shangha... in 20h     8m ago     error     isolated  main  

image

# job id
$ openclaw cron run <job id>

# ✅ job id
$ openclaw cron run 4c382689-4059-442d-b942-d54aea6b6802
{
  "ok": true,
  "enqueued": true,
  "runId": "manual:4c382689-4059-442d-b942-d54aea6b6802:1774669108375:2"
}

image

# ❌ job name
$ openclaw cron run shanghai-weather-daily
GatewayClientRequestError: Error: unknown cron job id: shanghai-weather-daily

image

# 配置文件
$ cat /home/xgqfms/.openclaw/cron/jobs.json

image

demos

corn jobs

{
  "version": 1,
  "jobs": [
    {
      "id": "4c382689-4059-442d-b942-d54aea6b6802",
      "agentId": "main",
      "name": "shanghai-weather-daily",
      "enabled": true,
      "createdAtMs": 1774554499198,
      "updatedAtMs": 1774666923746,
      "schedule": {
        "kind": "cron",
        "expr": "0 8 * * *",
        "tz": "Asia/Shanghai"
      },
      "sessionTarget": "isolated",
      "wakeMode": "now",
      "payload": {
        "kind": "agentTurn",
        "message": "请获取上海今天的天气预报,并提醒我是否需要注意防晒和带雨伞。"
      },
      "delivery": {
        "mode": "announce",
        "channel": "chat:oc_c3991196c******acc76914eba"
      },
      "state": {
        "nextRunAtMs": 1774742400000,
        "lastRunAtMs": 1774666897002,
        "lastRunStatus": "error",
        "lastStatus": "error",
        "lastDurationMs": 26744,
        "lastDeliveryStatus": "unknown",
        "consecutiveErrors": 4,
        "lastError": "Delivering to Feishu requires target <chatId|user:openId|chat:chatId>"
      }
    }
  ]
}

jq errors

# pretty print JSON
$ cat /home/xgqfms/.openclaw/cron/jobs.json | jq .

# ✅ 像 cat 一样输出 JSON 内容
# . 表示“原样输出整个 JSON”
$ jq . /home/xgqfms/.openclaw/cron/jobs.json

# ❌ jq 错误用法
# $ jq /home/xgqfms/.openclaw/cron/jobs.json
# 等价于 JSON 的“pretty print”
$ jq '.' file.json
# 等价于
$ cat file.json | jq .

https://chatgpt.com/c/69c745fc-4fcc-832a-9de4-3f8e32c23754

refs

https://docs.openclaw.ai/cli/cron

https://docs.openclaw.ai/automation/cron-jobs

©xgqfrms 2012-2021

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!