← 返回 Skills 市场
geq1fan

Cron Doctor by Clawra

作者 geq1fan · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
371
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install cron-doctor-clawra
功能描述
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 appears to do what it says: it reads local crontabs and system logs, analyzes failures, and writes a report to ~/workspace/reports. Before installing or invoking it, consider: (1) it will need permission to read system logs and may prompt for sudo to access /etc/crontab — grant only if you trust the skill; (2) logs can contain sensitive data (PII, secrets printed by jobs), so review any report before sharing; (3) provenance mismatch in the packaged metadata (owner ID and version differences) is a minor red flag — prefer skills with clear, consistent authorship; (4) run the skill in a controlled environment or inspect the SKILL.md yourself if you have concerns about what will be read or written. If you want higher assurance, request a signed/verified package or a version with matching metadata and a known homepage.
功能分析
Type: OpenClaw Skill Name: cron-doctor-clawra Version: 1.0.0 The skill provides standard diagnostic procedures for troubleshooting cron job failures, including reading crontabs and system logs (SKILL.md). While it suggests using sudo to access system-level cron files, this is consistent with its stated purpose and lacks any indicators of malicious intent, data exfiltration, or persistence. All instructions are transparent and aligned with the 'Cron Doctor' functionality.
能力评估
Purpose & Capability
The name/description ('Cron Doctor') align with the runtime instructions: listing crontabs, parsing cron logs, triaging errors, and writing a local report. There are no unexpected required binaries, environment variables, or external services. Note: metadata inconsistencies exist (registry Owner ID and _meta.json ownerId differ; SKILL.md version 1.1.0 vs registry version 1.0.0), which affect provenance but not core functionality.
Instruction Scope
SKILL.md instructs the agent to read local crontabs and system logs (/var/log/syslog, /var/log/cron, /etc/crontab, /etc/cron.d), run systemctl/launchctl, and suggests using 'sudo' for /etc/crontab. These actions are appropriate for diagnosing cron failures but do require local filesystem and system service access and may expose sensitive log contents (which can include PII or secrets from job outputs). The instructions do not direct data to external endpoints or request network exfiltration.
Install Mechanism
Instruction-only skill with no install spec and no code files. No artifacts will be written by an installer; the agent will run shell commands as directed at runtime. This is the lowest install risk.
Credentials
The skill declares no required environment variables, credentials, or config paths. The runtime steps rely only on local file/system access which is proportional to cron diagnosis. No unrelated secrets are requested.
Persistence & Privilege
The skill is not marked 'always' and uses default autonomous invocation settings. It does not request persistent system-wide configuration changes in the instructions. It writes reports to a user-local path (~/workspace/reports) which is appropriate for its purpose.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cron-doctor-clawra
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cron-doctor-clawra 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Test publish
元数据
Slug cron-doctor-clawra
版本 1.0.0
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Cron Doctor by Clawra 是什么?

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 插件,目前累计下载 371 次。

如何安装 Cron Doctor by Clawra?

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

Cron Doctor by Clawra 是免费的吗?

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

Cron Doctor by Clawra 支持哪些平台?

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

谁开发了 Cron Doctor by Clawra?

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

💬 留言讨论