定时任务管理。创建、查看、修改、删除定时任务,管理任务会话数据。当用户需要设置提醒、定时执行任务、管理调度计划时使用。
npx skills add https://github.com/countbot-ai/CountBot --skill cron-manager
通过命令行管理 CountBot 的定时任务系统,支持完整的 CRUD 操作和会话数据管理。
开始前先快速确认后端可用:
curl -s http://127.0.0.1:8000/api/cron/jobs || echo "后端服务没在运行!"
所有操作优先通过 exec 工具执行这个脚本:
python3 skills/cron-manager/scripts/cron_manager.py <command> [args]
硬性规则:
skills/cron-manager/scripts/cron_manager.py 这个脚本名,不要猜 cron.pyinfo/delete/enable/disable/run/messages/clean/reset 都优先传位置参数 <job_id>ls、再 help、再试错多次;优先直接按下面的准确命令执行-h 查看帮助# 基本创建(默认启用自动重试1次)
python3 skills/cron-manager/scripts/cron_manager.py create --name "每日天气" --schedule "0 9 * * *" --message "查询今天的天气并生成播报"
# 创建不重试的任务
python3 skills/cron-manager/scripts/cron_manager.py create --name "简单任务" --schedule "0 9 * * *" --message "执行简单任务" --max-retries 0
# 创建并推送到当前渠道(多机器人渠道应同时指定 account_id)
python3 skills/cron-manager/scripts/cron_manager.py create --name "每日天气" --schedule "0 9 * * *" --message "查询今天的天气并生成播报" --channel feishu --account-id bot --chat-id ou_xxxx --deliver
# 创建带自定义重试的任务(失败后最多重试 3 次,每次间隔 60 秒)
python3 skills/cron-manager/scripts/cron_manager.py create --name "重要任务" --schedule "0 9 * * *" --message "执行重要任务" --max-retries 3 --retry-delay 60
# 创建一次性任务(成功后自动删除)
python3 skills/cron-manager/scripts/cron_manager.py create --name "一次性提醒" --schedule "0 14 * * *" --message "下午2点提醒" --delete-on-success
curl -s http://127.0.0.1:8000/api/cron/jobs || echo "后端服务没在运行!"
# 需要更易读的格式时再用脚本
python3 skills/cron-manager/scripts/cron_manager.py list
python3 skills/cron-manager/scripts/cron_manager.py info <job_id>
# 修改调度时间
python3 skills/cron-manager/scripts/cron_manager.py update <job_id> --schedule "0 */2 * * *"
# 修改名称
python3 skills/cron-manager/scripts/cron_manager.py update <job_id> --name "新名称"
# 修改执行消息
python3 skills/cron-manager/scripts/cron_manager.py update <job_id> --message "新的执行指令"
# 修改渠道投递(注意:update 的 --deliver 需要显式写 true/false)
python3 skills/cron-manager/scripts/cron_manager.py update <job_id> --channel telegram --account-id default --chat-id 123456 --deliver true
python3 skills/cron-manager/scripts/cron_manager.py delete <job_id>
python3 skills/cron-manager/scripts/cron_manager.py enable <job_id>
python3 skills/cron-manager/scripts/cron_manager.py disable <job_id>
python3 skills/cron-manager/scripts/cron_manager.py run <job_id>
python3 skills/cron-manager/scripts/cron_manager.py validate "0 9 * * *"
# 从 JSON 文件批量创建任务
python3 skills/cron-manager/scripts/cron_manager.py batch-create --file tasks.json
JSON 文件格式示例:
[
{
"name": "每日天气",
"schedule": "0 9 * * *",
"message": "查询今天的天气",
"enabled": true,
"max_retries": 3,
"retry_delay": 60
},
{
"name": "每周报告",
"schedule": "0 10 * * 1",
"message": "生成本周工作报告",
"enabled": true,
"delete_on_success": false
}
]
# 批量删除多个任务(支持 ID 前缀匹配)
python3 skills/cron-manager/scripts/cron_manager.py batch-delete abc123 def456 ghi789
python3 skills/cron-manager/scripts/cron_manager.py messages <job_id> --limit 20
# 保留最近10条
python3 skills/cron-manager/scripts/cron_manager.py clean <job_id> --keep 10
# 清空所有消息
python3 skills/cron-manager/scripts/cron_manager.py clean <job_id> --keep 0
python3 skills/cron-manager/scripts/cron_manager.py reset <job_id>
格式: 分钟 小时 日 月 星期
| 表达式 | 含义 |
|--------|------|
| 0 9 * * * | 每天 9:00 |
| */30 * * * * | 每 30 分钟 |
| 0 9 * * 1-5 | 工作日 9:00 |
| 0 0 1 * * | 每月 1 日 0:00 |
| 0 */2 * * * | 每 2 小时整点 |
| 0 8,12,18 * * * | 每天 8:00、12:00、18:00 |
curl -s http://127.0.0.1:8000/api/cron/jobs || echo "后端服务没在运行!",确认后端在线cron.py;规范入口是 cron_manager.pyjob_id 的命令,只使用位置参数,不要写 --idcreate 的 --deliver 是无参开关;update 的 --deliver 必须写成 true 或 false--deliver--account-id,否则会默认落到 defaultchannel/chat_id/account_id--max-retries 指定最大重试次数(0 = 不重试,最多5次)--retry-delay 指定重试间隔秒数(默认 60 秒)--delete-on-success 标记任务为一次性任务batch-create 支持从 JSON 文件批量创建任务batch-delete 支持一次删除多个任务当用户通过飞书、钉钉、QQ、Telegram 等渠道与 AI 对话时,系统提示词中会自动包含当前渠道信息:
Channel: feishu
Chat ID: ou_xxxx
Account ID: bot
创建定时任务时,应主动利用这些信息:
Account ID示例:用户在飞书群中说"每天9点提醒我看天气"
python3 skills/cron-manager/scripts/cron_manager.py create --name "每日天气提醒" --schedule "0 9 * * *" --message "查询今天的天气并生成播报" --channel feishu --account-id bot --chat-id ou_xxxx --deliver
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.
Intelligently organizes your files and folders across your computer by understanding context, finding duplicates, suggesting better structures, and automating cleanup tasks. Reduces cognitive load and keeps your digital workspace tidy without manual effort.
Generates creative domain name ideas for your project and checks availability across multiple TLDs (.com, .io, .dev, .ai, etc.). Saves hours of brainstorming and manual checking.
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
Implements Manus-style file-based planning for complex tasks. Creates task_plan.md, findings.md, and progress.md. Use when starting complex multi-step tasks, research projects, or any task requiring >5 tool calls.
Creative research ideation and exploration. Use for open-ended brainstorming sessions, exploring interdisciplinary connections, challenging assumptions, or identifying research gaps. Best for early-stage research planning when you do not have specific observations yet. For formulating testable hypotheses from data use hypothesis-generation.
Comprehensive GitHub project management with swarm-coordinated issue tracking, project board automation, and sprint planning
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
Take countbot-ai/cron-manager from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.