Tooluck logoTooluck
SKILL.md

cron-manager

Agent skill fromcountbot-ai/CountBot

定时任务管理。创建、查看、修改、删除定时任务,管理任务会话数据。当用户需要设置提醒、定时执行任务、管理调度计划时使用。

How to install cron-manager

install cron-manager
# install the CountBot pack with the skills CLI
npx skills add countbot-ai/CountBot

# or add only this skill to Claude Code: copy the folder

workspace/skills/cron-manager/

# into

~/.claude/skills/cron-manager/ (all projects)

.claude/skills/cron-manager/ (one project)

workspace/skills/cron-manager/SKILL.md

MITFull file
1# 定时任务管理
2
3通过命令行管理 CountBot 的定时任务系统,支持完整的 CRUD 操作和会话数据管理。
4
5## 使用场景
6
7- 用户说"每天早上9点提醒我开会" -> 创建定时任务
8- 用户说"帮我设置一个每小时查天气的任务" -> 创建定时任务
9- 用户说"看看我有哪些定时任务" -> 列出任务
10- 用户说"把那个天气任务改成每2小时执行" -> 修改任务
11- 用户说"删掉那个新闻任务" -> 删除任务
12- 用户说"暂停/恢复某个任务" -> 禁用/启用任务
13- 用户说"立即执行一次那个任务" -> 手动触发
14- 用户说"看看天气任务的历史消息" -> 查看会话消息
15- 用户说"清理一下定时任务的历史记录" -> 清理会话
16
17## 命令行调用
18
19开始前先快速确认后端可用:
20
21```bash
22curl -s http://127.0.0.1:8000/api/cron/jobs || echo "后端服务没在运行!"
23```
24
25所有操作优先通过 `exec` 工具执行这个脚本:
26
27```bash
28python3 skills/cron-manager/scripts/cron_manager.py <command> [args]
29```
30
31硬性规则:
32
33- 只用 `skills/cron-manager/scripts/cron_manager.py` 这个脚本名,不要猜 `cron.py`
34- `info/delete/enable/disable/run/messages/clean/reset` 都优先传位置参数 `<job_id>`
35- 不要先 `ls`、再 `help`、再试错多次;优先直接按下面的准确命令执行
36- 只有在命令返回参数错误时,才补一条 `-h` 查看帮助
37
38### 创建任务
39
40```bash
41# 基本创建(默认启用自动重试1次)
42python3 skills/cron-manager/scripts/cron_manager.py create --name "每日天气" --schedule "0 9 * * *" --message "查询今天的天气并生成播报"
43
44# 创建不重试的任务
45python3 skills/cron-manager/scripts/cron_manager.py create --name "简单任务" --schedule "0 9 * * *" --message "执行简单任务" --max-retries 0
46
47# 创建并推送到当前渠道(多机器人渠道应同时指定 account_id)
48python3 skills/cron-manager/scripts/cron_manager.py create --name "每日天气" --schedule "0 9 * * *" --message "查询今天的天气并生成播报" --channel feishu --account-id bot --chat-id ou_xxxx --deliver
49
50# 创建带自定义重试的任务(失败后最多重试 3 次,每次间隔 60 秒)
51python3 skills/cron-manager/scripts/cron_manager.py create --name "重要任务" --schedule "0 9 * * *" --message "执行重要任务" --max-retries 3 --retry-delay 60
52
53# 创建一次性任务(成功后自动删除)
54…

Excerpt shown under the repository's MIT license.

More skills in CountBot

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates