cron-troubleshoot
Skill1 starsChanged 23 days agoMITView on GitHub
'Debug a cron job that failed or didn''t run: timezone, drift, overlap,
In this repository46 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .codex/AGENTS.mdAGENTS.md
- .gemini/AGENTS.mdAGENTS.md
- .cursor/rules/agent-foundry-orchestrator.mdcCursor rule
- .cursor/rules/agent-foundry-skills.mdcCursor rule
- web/llms.txtllms.txt
- anti-slopSkill
- api-designSkill
- automation-pickSkill
- bottleneck-gatingSkill
- budget-guardSkill
- cache-identitySkill
- constraint-then-solveSkill
- context-optimizationSkill
- e2e-test-strategySkill
- engram-routingSkill
- execution-observabilitySkill
- fallback-model-routingSkill
- feedback-loopSkill
- judge-integritySkill
- knowledge-extractSkill
- landscape-firstSkill
- measure-firstSkill
- plan-before-codeSkill
- plan-then-actSkill
- prompt-disciplineSkill
- pushback-when-wrongSkill
- quality-protocolSkill
- read-before-buildSkill
- re-verify-findingsSkill
- session-closeoutSkill
- session-distillSkill
- show-your-workSkill
- structured-output-contractSkill
- verify-firstSkill
- workflow-decomposeSkill
- agent-memory-vaultSkill
- agent-team-standardsSkill
- autonomous-briefingSkill
- book-to-skillSkill
- chrome-devtools-mcp-bridgeSkill
- design-languageSkill
- funnel-pr-guardSkill
- persistent-memorySkill
- sql-migration-trioSkill
- token-compressionSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 39
No log entry → schedule didn't fire (Step 2).
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Cron Troubleshoot
A systematic checklist for cron jobs that failed, ran twice, didn't run, or produced wrong output.
Procedure
Seven Failure Modes
| Mode | Symptom | Common cause |
| Wrong schedule | Runs at wrong time | Timezone, DST, misread cron syntax |
| No overlap protection | Two runs collide | Slow previous run + frequent schedule |
| Missing env | Fails immediately | Cron env is empty; PATH different |
| Dependency down | Fails partway | DB / API / cache unreachable |
| Silent failure | No logs | Output redirected or discarded |
| Permission drift | Fails after deploy | File ownership, secret rotation |
| Clock drift | Late by minutes | Server NTP not synced |
Step 1 — Verify It Ran
grep CRON /var/log/syslog
journalctl -u cron --since "1 hour ago"
crontab -lNo log entry → schedule didn't fire (Step 2). Log entry, no output → silent failure (Step 4).
Step 2 — Verify the Schedule
Common mistakes:
# WRONG — runs every minute of midnight (1440 runs/day)
0 * * * *
# RIGHT — runs at midnight
0 0 * * *Verify at crontab.guru.
Step 3 — Check Timezone
date && timedatectl && TZ=America/New_York dateFix: set TZ=... at the top of crontab, or convert to UTC.
Step 4 — Check for Silent Failure
Cron emails output by default. If you don't read mail, failures are silent.
Fix:
MAILTO=""
* * * * * /path/to/job >> /var/log/cronjob.log 2>&1Or wrap:
#!/bin/bash
exec >> /var/log/cronjob.log 2>&1
echo "=== $(date) ==="
/path/to/real-jobAnti-patterns
- Assuming the job ran without a log entry.
- Editing the schedule before checking timezone.
- Leaving output unredirected.
References
- details
Verification Checklist
- Log entry proves whether the job fired.
- Schedule was decoded against crontab syntax.
- Timezone and DST were checked.
- Overlap protection exists for slow jobs.
- Output is redirected to a readable log.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

