Casual Cron技能使用说明
2026-03-30
新闻来源:网淘吧
围观:14
电脑广告
手机广告
随意定时任务
通过自然语言创建Clawdbot定时任务。支持一次性及重复性计划,配备安全运行保护规则。
定时任务运行保护(硬性规则)
- 在定时任务内部运行时:禁止故障排查、禁止重启网关、禁止检查时间。
- 禁止发送确认通知或解释说明。
- 仅输出确切的消息载荷后立即停止。
工作原理
- 智能体从用户消息(或
/at//every指令)检测排程意图 - 解析要素:时间、频率、频道、目标、消息内容
- 构建
openclaw cron add命令并配置正确参数 - 执行前向用户确认已解析的时间、任务名称及任务ID
排程规则
当消息以/at或每个,都通过 CLI(而非 cron 工具 API)进行调度。

使用:openclaw cron add
/at(一次性)
- 如果用户给出一个具体时间(例如"下午3点"),则将其转换为 ISO 格式,并计算该日期在 America/New_York 时区的偏移量(确保夏令时安全)。
- 对于近期的提醒,优先使用相对时间(例如,
--at "20m")。 - 使用
--session isolated --message "精确输出:<任务>"。 - 始终包含
--delete-after-run。 - 始终包含
--deliver --channel <通道> --to <目标>。
/every(重复性)
- 如果是间隔时间:使用
--every "<时长>"(无需时区)。 - 如果是具体时间:使用
--cron "<expr>" --tz "America/New_York". - 使用
--session isolated --message "Output exactly: <task>". - 始终包含
--deliver --channel <channel> --to <destination>.
确认
- 在最终确定前,始终向用户确认解析的时间、作业名称和作业ID。
命令参考
一次性(时钟时间,支持夏令时):
openclaw cron add \
--name "Reminder example" \
--at "2026-01-28T15:00:00-05:00" \
--session isolated \
--message "Output exactly: <TASK>" \
--deliver --channel telegram --to <TELEGRAM_CHAT_ID> \
--delete-after-run
一次性(相对时间):
openclaw cron add \
--name "Reminder in 20m" \
--at "20m" \
--session isolated \
--message "Output exactly: <TASK>" \
--deliver --channel telegram --to <TELEGRAM_CHAT_ID> \
--delete-after-run
重复性(时钟时间,支持夏令时):
openclaw cron add \
--name "Daily 3pm reminder" \
--cron "0 15 * * *" --tz "America/New_York" \
--session isolated \
--message "Output exactly: <TASK>" \
--deliver --channel telegram --to <TELEGRAM_CHAT_ID>
重复性(时间间隔):
openclaw cron add \
--name "Every 2 hours" \
--every "2h" \
--session isolated \
--message "Output exactly: <TASK>" \
--deliver --channel telegram --to <TELEGRAM_CHAT_ID>
配置
| 设置项 | 值 |
|---|---|
| 默认时区 | America/New_York(支持夏令时) |
| 默认渠道 | telegram(通过CRON_DEFAULT_CHANNEL环境变量覆盖) |
| 支持的渠道 | telegram, whatsapp, slack, discord, signal |
支持的格式
时间格式
| 输入 | Cron表达式 |
|---|---|
上午8点 | 0 8 * * * |
晚上8:45 | 45 20 * * * |
中午 | 0 12 * * * |
午夜 | 0 0 * * * |
14:30 | 30 14 * * * |
频率
| 输入 | 行为 |
|---|---|
每天/每日 | 在指定时间每天执行 |
工作日/周一至周五 | 周一至周五指定时间 |
每周一/每个星期一 | 每周一执行 |
每小时/每小时一次 | 每小时整点执行 |
每两小时 | 0 */2 * * * |
每周 | 每周执行(默认为周一) |
每月 | 每月执行(每月1号) |
文章底部电脑广告
手机广告位-内容正文底部
上一篇:Diet Tracker技能使用说明
下一篇:Zhihu技能使用说明


微信扫一扫,打赏作者吧~