cron-manager — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited cron-manager (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
通过命令行管理 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-successcurl -s http://127.0.0.1:8000/api/cron/jobs || echo "后端服务没在运行!"
# 需要更易读的格式时再用脚本
python3 skills/cron-manager/scripts/cron_manager.py listpython3 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 truepython3 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.jsonJSON 文件格式示例:
[
{
"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 ghi789python3 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 0python3 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~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.