Diagnose and triage cron job failures. Checks job states, identifies error patterns, prioritizes by criticality, generates health reports. Triggers on: cron...
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install cron-doctor或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install cron-doctor⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/cron-doctor/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: cron-doctor version: 1.1.0 author: Polycat tags: [cron, monitoring, diagnosis] license: MIT platform: universal description: > Diagnose and triage cron job failures. Checks job states, identifies error patterns, prioritizes by criticality, generates health reports. Triggers on: cron failures, job health check, scheduled task errors, cron diagnosis, job not running, backup failed. ---
> Compatible with Claude Code, Codex CLI, Cursor, Windsurf, and any SKILL.md-compatible agent.
Diagnose and triage cron job failures.
When asked to check cron health or diagnose failures:
# List user's crontab
crontab -l
# List system crontabs
sudo cat /etc/crontab
ls -la /etc/cron.d/
# Check cron logs (location varies by system)
# Debian/Ubuntu:
grep CRON /var/log/syslog | tail -50
# RHEL/CentOS:
tail -50 /var/log/cron
# macOS:
log show --predicate 'process == "cron"' --last 1h
# Check for specific job output
grep "your_job_name" /var/log/syslog | tail -20
Error patterns to watch:
"command not found" — Missing executable or PATH issue"Permission denied" — File/directory permissions wrong"No such file or directory" — Script path incorrect"timeout" — Job took too long"ECONNREFUSED" — Network/service down"rate limit" — API throttling| Priority | Criteria | |----------|----------| | 🔴 Critical | Trading, backup, security jobs | | 🟠 High | User-facing deliveries | | 🟡 Medium | Monitoring, research jobs | | 🟢 Low | Nice-to-have, non-essential |
Write to ~/workspace/reports/cron-health-YYYY-MM-DD.md:
# Cron Health Report - [DATE]
## Summary
- ✅ Healthy: X jobs
- ⚠️ Warning: X jobs
- ❌ Failed: X jobs
## Failed Jobs
### [Job Name]
- **Error:** [message]
- **Last Success:** [date]
- **Priority:** [level]
- **Fix:** [suggested action]
## Recommendations
1. [Action item]
2. [Action item]
| Error | Fix | |-------|-----| | Command not found | Use full path to executable, or set PATH in crontab | | Permission denied | Check file permissions, run chmod +x script.sh | | No output | Add >> /tmp/job.log 2>&1 to capture output | | Wrong timezone | Set TZ= in crontab or use system timezone | | Rate limit | Reduce frequency or add backoff |
# Test cron environment (cron has minimal PATH)
env -i /bin/sh -c 'echo $PATH'
# Verify script runs manually
/path/to/your/script.sh
# Check if cron daemon is running
systemctl status cron # Linux
launchctl list | grep cron # macOS
If 3+ critical jobs failed, alert the user immediately.
Before claiming diagnosis complete:
~/workspace/reports/cron-health-YYYY-MM-DD.md安装 Cron Doctor 后,可以对 AI 说这些话来触发它
Help me get started with Cron Doctor
Explains what Cron Doctor does, walks through the setup, and runs a quick demo based on your current project
Use Cron Doctor to diagnose and triage cron job failures
Invokes Cron Doctor with the right parameters and returns the result directly in the conversation
What can I do with Cron Doctor in my developer & devops workflow?
Lists the top use cases for Cron Doctor, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/cron-doctor/ 目录(个人级,所有项目可用),或 .claude/skills/cron-doctor/(项目级)。重启 AI 客户端后,用 /cron-doctor 主动调用,或让 AI 根据上下文自动发现并使用。
Cron Doctor 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Cron Doctor 可免费安装使用。请查阅仓库了解许可证信息。
Diagnose and triage cron job failures. Checks job states, identifies error patterns, prioritizes by criticality, generates health reports. Triggers on: cron...
Cron Doctor 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using Cron Doctor
Identifies repetitive steps in your workflow and sets up Cron Doctor to handle them automatically