安装方式
cp -r nanobot/skills/cron ~/.claude/skills/cron把该 skill 目录放进客户端 skills 目录。不同客户端的目录可能不同,Claude Code 默认是 ~/.claude/skills/
https://raw.githubusercontent.com/HKUDS/nanobot/23941355a8932609d7fc7ba2820f162d1ea7bea5/nanobot/skills/cron/SKILL.md下载后另存为 ~/.claude/skills/cron/SKILL.md。链接锁定采集时的 commit,内容与本站展示一致。
整仓一次性获取:git clone --depth 1 https://github.com/HKUDS/nanobot.git
依赖与权限
- 无需 API Key
- 无需联网
- 无外部命令依赖
- 以上为按正文与 frontmatter 自动推断的信号,仅供参考;安装前建议先阅读原文。
SKILL.md 正文
Cron
Use the cron tool to schedule reminders or recurring tasks. New tasks run in the current chat. nanobot sends the agent's final reply to that chat. The user can change the task's chat in WebUI.
Write what to do in message. For a normal reminder or report, do not copy the current channel, chat ID, or instructions to call the message tool into the task. For example, use "Remind me to drink water", not "Call message to send to this chat".
If the user asks to send to other chats, preserve those recipients in the task instructions. Use the message tool for those sends and for file attachments. Existing tasks that explicitly request a message call still use it; changing the task's chat does not change explicit recipients in its instructions.
Choose by timing and notification behavior, not repetition. A specified time or interval uses cron, even when it repeats: "every day at 8am, remind me to drink water" is a cron task. Use HEARTBEAT.md for background checks with flexible timing that should notify only on actionable changes. Heartbeat does not guarantee a requested time or interval; do not substitute it for an explicit schedule.
Task Types
- Reminder - the agent replies with the reminder when the task runs
- Task - the agent follows the instructions and replies with the result
- One-time - runs once at a specific time, then auto-deletes
Examples
Fixed reminder:
cron(action="add", message="Time to take a break!", every_seconds=1200)
Dynamic task (agent executes each time):
cron(action="add", message="Check HKUDS/nanobot GitHub stars and report", every_seconds=600)
One-time scheduled task (compute ISO datetime from current time):
cron(action="add", message="Remind me about the meeting", at="<ISO datetime>")
Timezone-aware cron:
cron(action="add", message="Morning standup", cron_expr="0 9 * * 1-5", tz="America/Vancouver")
List/remove:
cron(action="list")
cron(action="remove", job_id="abc123")
Time Expressions
| User says | Parameters |
|---|---|
| every 20 minutes | every_seconds: 1200 |
| every hour | every_seconds: 3600 |
| every day at 8am | cron_expr: "0 8 *" |
| weekdays at 5pm | cron_expr: "0 17 1-5" |
| 9am Vancouver time daily | cron_expr: "0 9 *", tz: "America/Vancouver" |
| at a specific time | at: ISO datetime string (compute from current time) |
Timezone
Use tz with cron_expr to schedule in a specific IANA timezone. Without tz, the server's local timezone is used.
质量与来源
- 所属仓库
- HKUDS/nanobot
- 仓库星标
- 4.9 万
- 最近更新
- 今天
- 采集时间
- 今天
- commit
- 23941355a893
- 内容指纹
- sha256:ab6bae1889b23e7
- 文件路径
- nanobot/skills/cron/SKILL.md