feat: init sproutclaw-cron 定时任务管理框架

- 每任务一目录结构,统一开关与日志
- cronctl CLI:enable/disable/toggle/status/run/sync-cron
- 公共库 lib/shumengya_cron:runner/manager/notify/ssh
- _template 示例任务(hello world + 复制模板)
- webui 管理面板:FastAPI 后端 + 文档式响应式前端
This commit is contained in:
2026-06-24 16:19:53 +08:00
commit 6c2db2dfa3
23 changed files with 2667 additions and 0 deletions

9
_template/schedule.cron Normal file
View File

@@ -0,0 +1,9 @@
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOME=/root
CRON_MAIL_ENABLED=1
# 每天 08:00 输出 hello world示例任务复制本目录创建新任务
# 将本文件复制到 /etc/cron.d/_template 即可生效cronctl enable 会自动同步)
# 开关python3 /shumengya/project/agent/sproutclaw-cron/cronctl.py enable|disable|toggle _template
0 8 * * * root /usr/bin/python3 /shumengya/project/agent/sproutclaw-cron/cronctl.py run _template >/dev/null 2>&1