This is a full CRUD interface for managing cron jobs in CountBot. It handles the usual stuff like creating scheduled tasks with cron expressions, listing them, updating schedules, and deleting jobs. The interesting bits are the built-in retry logic (defaults to one retry after 60 seconds, configurable up to five), auto-delete on success for one-off reminders, and channel-aware delivery that can push task results directly to Feishu, Telegram, or other platforms. It also manages session data per task, so you can view execution history or clean up old messages. The CLI is the main interface, though it wraps a REST API running on localhost:8000. Useful when you need scheduled reminders or recurring tasks that interact with the bot's conversational context instead of just running headless jobs.

GitHub stars
722
last updated
Jun 1, 2026

Install

$ npx -y skills add countbot-ai/countbot --skill cron-manager --agent claude-code

Installs into .claude/skills of the current project.

Files

定时任务管理

通过命令行管理 CountBot 的定时任务系统,支持完整的 CRUD 操作和会话数据管理。

使用场景

  • 用户说"每天早上9点提醒我开会" -> 创建定时任务
  • 用户说"帮我设置一个每小时查天气的任务" -> 创建定时任务
  • 用户说"看看我有哪些定时任务" -> 列出任务
  • 用户说"把那个天气任务改成每2小时执行" -> 修改任务
  • 用户说"删掉那个新闻任务" -> 删除任务
  • 用户说"暂停/恢复某个任务" -> 禁用/启用任务
  • 用户说"立即执行一次那个任务" -> 手动触发
  • 用户说"看看天气任务的历史消息" -> 查看会话消息
  • 用户说"清理一下定时任务的历史记录" -> 清理会话

命令行调用

开始前先快速确认后端可用:

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.py
  • info/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

Sponsors

Details

Repository
github.com/countbot-ai/countbot
Category
Automation & Workflows
License
MIT
First seen
Jun 11, 2026

More from countbot-ai/countbot

All 14
1daffy0208 avatarPRP Generatordaffy0208/ai-dev-standardsGuides creation of Product Requirements Prompts (PRPs) - comprehensive requirement documents that serve as the foundation for AI-assisted development0skills.sh installs
2jdrhyne avatarparallel-taskjdrhyne/agent-skillsCoordinate plan files by launching multiple parallel subagents for unblocked tasks. Triggers on explicit "/parallel-task" commands.0skills.sh installs
3jkomoros avatargit-workflowjkomoros/community-patterns>0skills.sh installs
4k-dense-ai avatardispatching-parallel-investigationsk-dense-ai/science-superpowersWhen you have multiple independent investigations that don't share state, this runs them in parallel rather than sequentially.0skills.sh installs
5kubesphere avatarkubesphere-devops-pipelinekubesphere/kubesphereThis handles CI/CD pipeline operations in KubeSphere's DevOps platform, which wraps Jenkins with Kubernetes custom resources.0skills.sh installs
6labring avatarworkflow-stop-designlabring/FastGPT工作流暂停逻辑设计方案0skills.sh installs