npx skills add https://github.com/tclawde/openclaw-skills-user --skill cron-helper用途: 指导我使用 openclaw cron CLI 来创建基于时间的任务,并在创建/删除时发送日志。
使用时机:
始终优先使用 cron 而非手动计时。
原因:我缺乏内部时钟。手动“自己跟踪时间”会失败,因为我可能会沉浸在阅读/思考中而忘记时间。Cron 是一个可靠的外部时钟。
当你希望代理实际执行任务时,使用 --session isolated:
格式:
openclaw cron add \
--name "job_name" \
--cron "0 9 * * *" \
--session isolated \
--message "Task instructions for the agent" \
--deliver \
--channel feishu
Purpose: Guides me to use openclaw cron CLI for time-based tasks and send logs on create/remove.
When to use:
Always prefer cron over manual timing.
Reason: I lack an internal clock. Manual "track time yourself" fails because I can get absorbed in reading/thinking and lose track of time. Cron is an external clock that works reliably.
Use --session isolated when you want the agent to actually perform a task :
Format:
openclaw cron add \
--name "job_name" \
--cron "0 9 * * *" \
--session isolated \
--message "Task instructions for the agent" \
--deliver \
--channel feishu
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
仅用于简单通知时,使用 --session main 和 --system-event:
格式:
openclaw cron add \
--name "reminder" \
--at "+30m" \
--session main \
--system-event "Reminder: check email"
关键词:"every", "remind", "schedule", "定时", "每小时/每天/每周", "在X分钟后执行"
从用户处获取:
对于代理任务(推荐):
openclaw cron add \
--name "task_name" \
--at "+10m" \
--session isolated \
--message "Your task instructions here" \
--deliver \
--channel feishu
对于简单提醒:
openclaw cron add \
--name "reminder" \
--at "+10m" \
--session main \
--system-event "Your reminder message"
删除 cron 任务:
openclaw cron rm <job_id>
列出所有 cron 任务:
openclaw cron list
其他有用命令:
openclaw cron status # 查看调度器状态
openclaw cron run <job_id> # 立即触发任务
openclaw cron enable <job_id> # 启用任务
openclaw cron disable <job_id> # 禁用任务
openclaw cron runs <job_id> # 查看执行历史
使用 --session isolated 时,可以将输出发送到聊天:
| 选项 | 描述 |
|---|---|
--deliver | 启用交付(频道输出必需) |
--channel <name> | 频道:feishu、telegram、slack、whatsapp 等 |
--to <dest> | 频道特定目标(聊天 ID、电话号码等) |
--post-mode full | 发布完整输出而非摘要 |
示例:
# 交付到飞书
--deliver --channel feishu
# 交付到 Telegram
--deliver --channel telegram --to "-1001234567890"
# 交付完整输出
--deliver --channel feishu --post-mode full
| 选项 | 描述 |
|---|---|
--cron <expr> | Cron 表达式(5 字段或带秒的 6 字段) |
--every <duration> | 每隔指定时长运行(例如,10m、1h) |
--at <when> | 在指定时间运行一次(ISO 格式或 +时长,支持 m/s) |
--tz <iana> | 时区(默认:本地) |
| `--session main | isolated` |
--system-event <text> | 系统事件负载(仅限主会话) |
--message <text> | 代理消息负载(仅限隔离会话) |
--delete-after-run | 成功运行后删除一次性任务 |
--disabled | 以禁用状态创建任务 |
创建或删除 cron 任务后,发送一条包含确切命令的日志:
日志格式:
# 新增任务
[HH:MM] CRON ✅
$ openclaw cron add \
--name "job_name" \
--at "+10m" \
--session isolated \
--message "task description" \
--deliver \
--channel feishu
# 删除任务
[HH:MM] CRON ❌
$ openclaw cron rm <job_id>
示例:
# 新增
[21:30] CRON ✅
$ openclaw cron add \
--name "daily-summary" \
--cron "0 9 * * *" \
--tz "Asia/Shanghai" \
--session isolated \
--message "总结今天的工作" \
--deliver \
--channel feishu
# 删除
[21:41] CRON ❌
$ openclaw cron rm 983a0f0e-0976-414a-b3d0-fd09c533e301
要点:
Cron → 人类可读映射(五位 - 分时日月周):
*/5 * * * * → 每5分钟*/30 * * * * → 每30分钟0 * * * * → 每1小时0 */2 * * * → 每2小时0 9 * * * → 每天1次(09:00)0 10,22 * * * → 每天2次(10:00,22:00)0 9 * * 1 → 每周1次(周一09:00)Cron → 人类可读映射(六位 - 秒分时日月周):
*/1 * * * * * → 每1秒*/5 * * * * * → 每5秒*/30 * * * * * → 每30秒| 使用场景 | 会话 | 负载 | 交付 |
|---|---|---|---|
| 代理执行任务 | isolated | --message | --deliver ✅ |
| 简单通知 | main | --system-event | ❌ |
经验法则: 如果你希望代理做某事(使用工具、发送消息),请使用 --session isolated + --message。
❌ 不要说“我会自己设置提醒”
❌ 不要尝试手动跟踪时间
❌ 当你需要代理执行任务时,不要使用 --system-event
❌ 当你需要将输出发送到聊天时,不要忘记 --deliver
❌ 不要发送执行日志(仅在创建/删除时记录日志)
✅ 始终使用 openclaw cron CLI
✅ 代理任务使用 --session isolated
✅ 仅简单通知使用 --session main
✅ 仅在创建/删除时发送日志
✅ 保持日志简单明了
| 频率 | Cron 表达式 | CLI 标志 |
|---|---|---|
| 每 5 分钟 | */5 * * * * | --cron "*/5 * * * *" |
| 每 30 分钟 | */30 * * * * | --cron "*/30 * * * *" |
| 每小时 | 0 * * * * | --cron "0 * * * *" |
| 每 2 小时 | 0 */2 * * * | --cron "0 */2 * * *" |
| 每天上午 9 点 | 0 9 * * * | --cron "0 9 * * *" |
| 每天两次(上午 10 点,晚上 10 点) | 0 10,22 * * * | --cron "0 10,22 * * *" |
| 每周(周一上午 9 点) | 0 9 * * 1 | --cron "0 9 * * 1" |
| 频率 | Cron 表达式 | CLI 标志 |
|---|---|---|
| 每秒 | */1 * * * * * | --cron "*/1 * * * * *" |
| 每 5 秒 | */5 * * * * * | --cron "*/5 * * * * *" |
| 每 30 秒 | */30 * * * * * | --cron "*/30 * * * * *" |
时长标志:
| 频率 | CLI 标志 |
|---|---|
| 每 10 分钟 | --every "10m" |
| 每 2 小时 | --every "2h" |
| 20 分钟后一次 | --at "+20m" |
| 20 秒后一次 | --at "+20s" |
技能安装后自动加载。
每周安装次数
242
仓库
首次出现
2026年2月20日
安全审计
安装于
opencode240
cursor240
kimi-cli239
gemini-cli239
amp239
github-copilot239
Use --session main with --system-event for simple notifications only :
Format:
openclaw cron add \
--name "reminder" \
--at "+30m" \
--session main \
--system-event "Reminder: check email"
Keywords: "every", "remind", "schedule", "定时", "每小时/每天/每周", "在X分钟后执行"
Get from user:
For agent tasks (RECOMMENDED):
openclaw cron add \
--name "task_name" \
--at "+10m" \
--session isolated \
--message "Your task instructions here" \
--deliver \
--channel feishu
For simple reminders:
openclaw cron add \
--name "reminder" \
--at "+10m" \
--session main \
--system-event "Your reminder message"
Remove a cron job:
openclaw cron rm <job_id>
List all cron jobs:
openclaw cron list
Other useful commands:
openclaw cron status # 查看调度器状态
openclaw cron run <job_id> # 立即触发任务
openclaw cron enable <job_id> # 启用任务
openclaw cron disable <job_id> # 禁用任务
openclaw cron runs <job_id> # 查看执行历史
When using --session isolated, you can deliver output to a chat:
| Option | Description |
|---|---|
--deliver | Enable delivery (required for channel output) |
--channel <name> | Channel: feishu, telegram, slack, whatsapp, etc. |
--to <dest> | Channel-specific target (chat ID, phone, etc.) |
--post-mode full | Post full output instead of summary |
Examples:
# Deliver to Feishu
--deliver --channel feishu
# Deliver to Telegram
--deliver --channel telegram --to "-1001234567890"
# Deliver with full output
--deliver --channel feishu --post-mode full
| Option | Description |
|---|---|
--cron <expr> | Cron expression (5-field or 6-field with seconds) |
--every <duration> | Run every duration (e.g., 10m, 1h) |
--at <when> | Run once at time (ISO or +duration, supports m/s) |
--tz <iana> | Timezone (default: local) |
| `--session main | isolated` |
--system-event <text> | System event payload (main session only) |
--message <text> | Agent message payload (isolated session only) |
--delete-after-run | Delete one-shot job after success |
--disabled | Create job in disabled state |
After creating or removing cron jobs, send ONE log with the exact command:
Log format:
# 新增任务
[HH:MM] CRON ✅
$ openclaw cron add \
--name "job_name" \
--at "+10m" \
--session isolated \
--message "task description" \
--deliver \
--channel feishu
# 删除任务
[HH:MM] CRON ❌
$ openclaw cron rm <job_id>
Examples:
# 新增
[21:30] CRON ✅
$ openclaw cron add \
--name "daily-summary" \
--cron "0 9 * * *" \
--tz "Asia/Shanghai" \
--session isolated \
--message "总结今天的工作" \
--deliver \
--channel feishu
# 删除
[21:41] CRON ❌
$ openclaw cron rm 983a0f0e-0976-414a-b3d0-fd09c533e301
Key points:
Cron → Human mapping (五位 - 分时日月周):
*/5 * * * * → 每5分钟*/30 * * * * → 每30分钟0 * * * * → 每1小时0 */2 * * * → 每2小时0 9 * * * → 每天1次(09:00)0 10,22 * * * → 每天2次(10:00,22:00)0 9 * * 1 → 每周1次(周一09:00)Cron → Human mapping (六位 - 秒分时日月周):
*/1 * * * * * → 每1秒*/5 * * * * * → 每5秒*/30 * * * * * → 每30秒| Use Case | Session | Payload | Delivery |
|---|---|---|---|
| Agent performs task | isolated | --message | --deliver ✅ |
| Simple notification | main | --system-event | ❌ |
Rule of thumb: If you want the agent to do something (use tools, send messages), use --session isolated + --message.
❌ Don't say "I'll set a reminder myself" ❌ Don't try to track time manually ❌ Don't use --system-event when you need the agent to execute tasks ❌ Don't forget --deliver when you need output sent to chat ❌ Don't send execution logs (only log on create/remove)
✅ Always use the openclaw cron CLI ✅ Use --session isolated for agent tasks ✅ Use --session main for simple notifications only ✅ Send log on create/remove only ✅ Keep log simple and clean
| Frequency | Cron Expression | CLI Flag |
|---|---|---|
| Every 5 min | */5 * * * * | --cron "*/5 * * * *" |
| Every 30 min | */30 * * * * | --cron "*/30 * * * *" |
| Every hour | 0 * * * * | --cron "0 * * * *" |
| Every 2 hours | 0 */2 * * * | --cron "0 */2 * * *" |
| Daily at 9am | 0 9 * * * | --cron "0 9 * * *" |
| Twice daily (10am, 10pm) | 0 10,22 * * * | --cron "0 10,22 * * *" |
| Weekly (Monday 9am) | 0 9 * * 1 | --cron "0 9 * * 1" |
| Frequency | Cron Expression | CLI Flag |
|---|---|---|
| Every 1 second | */1 * * * * * | --cron "*/1 * * * * *" |
| Every 5 seconds | */5 * * * * * | --cron "*/5 * * * * *" |
| Every 30 seconds | */30 * * * * * | --cron "*/30 * * * * *" |
Duration flags:
| Frequency | CLI Flag |
|---|---|
| Every 10 minutes | --every "10m" |
| Every 2 hours | --every "2h" |
| Once in 20 minutes | --at "+20m" |
| Once in 20 seconds | --at "+20s" |
Loaded automatically when skill is installed.
Weekly Installs
242
Repository
First Seen
Feb 20, 2026
Security Audits
Installed on
opencode240
cursor240
kimi-cli239
gemini-cli239
amp239
github-copilot239
Azure Data Explorer (Kusto) 查询技能:KQL数据分析、日志遥测与时间序列处理
102,600 周安装
OpenNews 加密货币新闻聚合器 - 72+数据源AI分析,实时交易信号与双语摘要
914 周安装
Element Plus Vue3 使用指南:安装、配置、组件详解与问题排查
933 周安装
抽奖赢家选取器 - 随机选择工具,支持CSV、Excel、Google Sheets,公平透明
928 周安装
Medusa 前端开发指南:使用 SDK、React Query 构建电商商店
928 周安装
腾讯云CloudBase Web前端开发指南:静态托管部署、SDK集成与项目构建
931 周安装
Convex Agents:构建持久化有状态AI代理的完整解决方案,支持工具集成和RAG
926 周安装