名称: set-reminder
描述: 当用户希望在特定时间或按重复计划被提醒某事时使用。创建基于 cron 的提醒,并通过 iMessage、Discord 或其他已配置的渠道发送。
使用 OpenClaw cron 系统创建经过验证的提醒。处理时间解析、渠道验证,并通过已配置的渠道发送。
在任何工作区中执行:
python3 skills/set-reminder/scripts/set_reminder.py --at <时间> --message "<提醒内容>" [--channel <渠道名称>]
python3 skills/set-reminder/scripts/set_reminder.py --every <间隔> --message "<提醒内容>" [--channel <渠道名称>]
python3 skills/set-reminder/scripts/set_reminder.py --cron "<cron表达式>" --message "<提醒内容>" [--channel <渠道名称>]
或者使用 {baseDir}(技能目录):
python3 {baseDir}/scripts/set_reminder.py --at <时间> --message "<提醒内容>" [--channel <渠道名称>]
python3 {baseDir}/scripts/set_reminder.py --every <间隔> --message "<提醒内容>" [--channel <渠道名称>]
python3 {baseDir}/scripts/set_reminder.py --cron "<cron表达式>" --message "<提醒内容>" [--channel <渠道名称>]
| 参数 | 描述 |
|---|---|
--at |
单次提醒:ISO 格式日期时间(如 2025-02-01T14:00:00)或相对时间(如 +20m、+1h、+2d) |
--every |
重复间隔:如 30m、2h、1d |
--cron |
5 字段 cron 表达式:如 "0 9 * * *" |
--message |
提醒文本内容(必需) |
--channel |
配置中的渠道名称(可选,默认使用默认渠道) |
# 20 分钟后提醒
python3 skills/set-reminder/scripts/set_reminder.py --at "+20m" --message "吃药"
# 每天上午 9 点通过 Discord 提醒
python3 skills/set-reminder/scripts/set_reminder.py --cron "0 9 * * *" --message "站会" --channel discord
# 每 2 小时提醒一次
python3 skills/set-reminder/scripts/set_reminder.py --every "2h" --message "喝水"
工作区/本地技能(推荐):
在技能目录中创建 config.json 文件:
{
"default": "imessage",
"timezone": "America/Edmonton",
"channels": {
"imessage": "user@example.com",
"discord": "1234567890123456789"
}
}
托管技能(旧版):
在 ~/.openclaw/openclaw.json 文件的 skills.entries.set-reminder.config.<agentId> 路径下配置:
"set-reminder": {
"enabled": true,
"config": {
"main": {
"default": "imessage",
"timezone": "America/Edmonton",
"channels": { "imessage": "user@example.com" }
}
}
}
必需字段: default、timezone、channels
openclaw cron add 创建 cron 任务配置优先级:
1. <skill_dir>/config.json(工作区/本地技能 - 最高优先级)
2. ~/.openclaw/skills/set-reminder/config.json(托管技能)
3. ~/.openclaw/openclaw.json 中的 skills.entries.set-reminder.config 路径(旧版回退方案)