← 返回 Skills 市场
suryast

Cron Doctor

作者 suryast · GitHub ↗ · v1.0.1
cross-platform ✓ 安全检测通过
1307
总下载
0
收藏
7
当前安装
2
版本数
在 OpenClaw 中安装
/install cron-doctor
功能描述
Diagnose and triage cron job failures. Checks job states, identifies error patterns, prioritizes by criticality, generates health reports. Triggers on: cron...
使用说明 (SKILL.md)

Compatible with Claude Code, Codex CLI, Cursor, Windsurf, and any SKILL.md-compatible agent.

Cron Doctor

Diagnose and triage cron job failures.

Usage

When asked to check cron health or diagnose failures:

1. List All Jobs

# List user's crontab
crontab -l

# List system crontabs
sudo cat /etc/crontab
ls -la /etc/cron.d/

2. Check Recent Execution

# 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

3. Identify Problems

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
  • Missing output — Job may not be running at all

4. Triage Priority

Priority Criteria
🔴 Critical Trading, backup, security jobs
🟠 High User-facing deliveries
🟡 Medium Monitoring, research jobs
🟢 Low Nice-to-have, non-essential

5. Generate Report

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]

6. Common Fixes

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

7. Debugging Tips

# 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

Escalation

If 3+ critical jobs failed, alert the user immediately.

Verification Gates

Before claiming diagnosis complete:

  • All failed jobs listed — none skipped or ignored
  • Priority assigned — based on impact, not just recency
  • Fix suggested — actionable next step for each failure
  • Report written — to ~/workspace/reports/cron-health-YYYY-MM-DD.md
  • Critical failures escalated — 3+ critical = alert user
安全使用建议
This skill is instruction-only and appears coherent for diagnosing cron jobs. Before running it: (1) be aware it expects to read system files (crontab, /var/log/*, /etc/crontab) and may prompt for sudo to access system crontabs — only grant sudo if you trust the agent. (2) It writes reports to ~/workspace/reports; review those files if they contain sensitive output. (3) There are no network/exfiltration endpoints or required credentials in the instructions, but any agent that can execute shell commands has broad power — run it in a controlled environment or review commands before execution if you have concerns. (4) Note a minor metadata mismatch (SKILL.md version differs from registry), which looks like a bookkeeping issue, not a security problem.
功能分析
Type: OpenClaw Skill Name: cron-doctor Version: 1.0.1 The skill bundle is benign. It provides instructions and commands for an AI agent to diagnose and triage cron job failures. All commands listed in SKILL.md, such as `crontab -l`, `sudo cat /etc/crontab`, `grep` on log files, and `systemctl status`, are standard diagnostic tools aligned with the stated purpose. While `sudo` is used to read system crontabs, this is a legitimate diagnostic step and not indicative of malicious intent. There is no evidence of data exfiltration, persistence mechanisms, malicious execution, or prompt injection attempts designed to subvert the agent's behavior. The external links in README.md are for product promotion, not for malicious purposes.
能力评估
Purpose & Capability
Name and description (cron diagnosis, triage, reporting) align with the instructions: reading crontabs and cron logs, identifying common error strings, prioritizing failures, and producing a local report.
Instruction Scope
SKILL.md instructs the agent to run shell commands that read crontabs and system logs (e.g., crontab -l, /var/log/syslog, /etc/crontab) and to write reports under ~/workspace/reports. These actions are appropriate for cron diagnosis, but they involve reading potentially sensitive local system files and may require sudo for system crontabs.
Install Mechanism
No install spec and no code files — lowest-risk instruction-only skill. Nothing is downloaded or written by an installer.
Credentials
The skill declares no required environment variables, credentials, or config paths. The runtime instructions reference typical system files for cron diagnostics only; they do not ask for unrelated credentials or environment secrets.
Persistence & Privilege
Flags show default autonomy settings (agent invocation allowed) but not always:true; the skill does not request persistent installation or modify other skills or system-wide settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cron-doctor
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cron-doctor 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Add premium skills promo links
v1.0.0
Initial release
元数据
Slug cron-doctor
版本 1.0.1
许可证
累计安装 8
当前安装数 7
历史版本数 2
常见问题

Cron Doctor 是什么?

Diagnose and triage cron job failures. Checks job states, identifies error patterns, prioritizes by criticality, generates health reports. Triggers on: cron... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1307 次。

如何安装 Cron Doctor?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install cron-doctor」即可一键安装,无需额外配置。

Cron Doctor 是免费的吗?

是的,Cron Doctor 完全免费(开源免费),可自由下载、安装和使用。

Cron Doctor 支持哪些平台?

Cron Doctor 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Cron Doctor?

由 suryast(@suryast)开发并维护,当前版本 v1.0.1。

💬 留言讨论