自动化与 Hooks
OpenClaw 提供多种自动化能力。
Cron 任务
定时执行任务:
bash
# 添加定时任务
openclaw cron add --name "daily-report" --cron "0 9 * * *" --message "生成日报"
# 列出任务
openclaw cron list
# 手动运行
openclaw cron run <id>参见 Cron 任务。
Heartbeat
周期性检查:
bash
openclaw system heartbeat enable
openclaw system heartbeat lastWebhooks
接收外部事件:
- Gmail Pub/Sub
- 自定义 Webhook
参见 Webhook。
Hooks
消息处理钩子:
- 预处理钩子
- 后处理钩子
参见 Hooks。