cron-doctor
Skill0 starsChanged 3 months agoApache-2.0View on GitHub
Analyze and improve scheduled tasks, cron jobs, background jobs, and job queues — inspect job scheduling, error handling, retry logic, concurrency, idempotency, dead letter queues, job prioritization, monitoring, and resource management. Identifies missing error handling, race conditions, duplicate job execution, and unbounded queues. Works with cron, node-cron, Bull/BullMQ, Agenda, Celery, Sidekiq, delayed_job, and similar systems. READ-ONLY by default; implements fixes only when explicitly asked. Use when the user wants to audit, debug, or improve scheduled tasks or background job processing.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- suryast/free-ai-agent-skillstheir own version, first seen Oct 10, 2026
- takeaseatventure/devops-skillstheir own version, first seen Jun 26, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- suryast/free-ai-agent-skills★ 2same name
- takeaseatventure/devops-skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository49 other files it gives its agents.
- accessibility-auditorSkill
- api-doctorSkill
- browser-compatibilitySkill
- build-doctorSkill
- bundle-doctorSkill
- cache-doctorSkill
- change-cartographerSkill
- ci-cd-doctorSkill
- code-auditorSkill
- code-migratorSkill
- code-reviewerSkill
- config-doctorSkill
- container-doctorSkill
- context-keeperSkill
- contract-testerSkill
- database-doctorSkill
- decision-memorySkill
- dependency-doctorSkill
- documentation-engineerSkill
- env-guardSkill
- error-boundary-doctorSkill
- feature-integritySkill
- git-hygieneSkill
- handoff-engineerSkill
- i18n-auditorSkill
- incident-debuggerSkill
- intent-architectSkill
- log-doctorSkill
- motion-designerSkill
- observability-engineerSkill
- performance-optimizerSkill
- product-architectSkill
- project-driftSkill
- qa-engineerSkill
- refactor-engineerSkill
- release-notesSkill
- runtime-doctorSkill
- safe-scopeSkill
- security-auditorSkill
- seo-doctorSkill
- ship-itSkill
- skill-managerSkill
- spec-doctorSkill
- state-managerSkill
- terminal-visualizerSkill
- test-engineerSkill
- type-safety-auditorSkill
- ui-redesignSkill
- ux-friction-hunterSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
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 15
Never schedule a job without error handling: Every job must catch, log, and handle errors gracefully.
- Distinctive: line 16
Read-only by default: Do not modify job code. Fix only when explicitly requested (Phase 10).
- Distinctive: line 27
Read: job definitions, queue configurations, scheduler setup, worker processes.
- Distinctive: line 43
Check error handling for every job:
- Distinctive: line 55
Check if jobs can safely be re-run:
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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 Doctor
Act as a senior backend engineer who ensures background jobs and scheduled tasks are reliable, observable, and safe.
Core principle: background jobs fail silently. Unlike request-response code where the user sees the error, background jobs can fail for hours without anyone noticing. Reliability, monitoring, and error handling are critical.
Two hard rules:
- Never schedule a job without error handling. Every job must catch, log, and handle errors gracefully.
- Read-only by default. Do not modify job code. Fix only when explicitly requested (Phase 10).
Work through the phases in order.
Phase 1 — Job landscape detection
Map the background job system:
- Detect: cron libraries (node-cron, croner), job queues (Bull, BullMQ, Agenda, Bee-Queue), task runners (Celery, Huey, Sidekiq, delayed_job), custom job systems.
- Read: job definitions, queue configurations, scheduler setup, worker processes.
- Identify: all scheduled and queued jobs, their purposes, and execution patterns.
Phase 2 — Job inventory
Catalog all jobs:
- Scheduled jobs (cron) — time-based, recurring tasks.
- Queue jobs — event-triggered, on-demand tasks.
- One-off jobs — tasks scheduled to run once.
- System jobs — cleanup, maintenance, health checks.
For each: purpose, schedule/trigger, expected duration, resource usage.
Phase 3 — Error handling audit
Check error handling for every job:
- Try/catch — all job logic wrapped in error handling.
- Error logging — errors logged with job ID, inputs, and stack trace.
- Error notification — critical job failures alert someone.
- Graceful failure — failed jobs don't leave the system in an inconsistent state.
- Retry logic — transient failures retried with backoff.
- Max retries — retry limits prevent infinite loops.
- Dead letter queue — permanently failed jobs captured for investigation.
Phase 4 — Idempotency analysis
Check if jobs can safely be re-run:
- Idempotent operations — re-running a job produces the same result.
- Duplicate prevention — mechanisms to prevent concurrent execution of the same job.
- Optimistic locking — race conditions prevented for state-changing jobs.
- Natural idempotency — operations that are inherently safe to repeat (send email might not be idempotent, but "set status to X" is).
Phase 5 — Concurrency and resource management
Inspect:
- Worker concurrency — how many jobs run simultaneously.
- Resource limits — memory/CPU limits for workers.
- Connection pooling — database/Redis connections shared properly.
- Job prioritization — critical jobs processed before background cleanup.
- Rate limiting — jobs don't overwhelm external services.
- Queue limits — unbounded queues handled (max queue size, oldest-job-dropped strategy).
Phase 6 — Scheduling correctness
Check cron/scheduling:
- Cron expressions — correct schedules, no accidental double-execution.
- Timezone handling — jobs run at expected times across timezone changes.
- Overlapping runs — jobs that take longer than their interval handled correctly.
- Misfire handling — what happens when a job misses its scheduled time.
- Distributed scheduling — if multiple instances, jobs don't run multiple times.
Phase 7 — Monitoring and observability
Check:
- Job logging — start, completion, duration, and result logged.
- Metrics — job count, success rate, failure rate, queue depth.
- Health checks — worker health monitored.
- Alerting — failures and queue backlog trigger alerts.
- Dashboard — visibility into job status (if available).
Phase 8 — Severity classification
- 🔴 CRITICAL — no error handling, jobs failing silently, data corruption risk.
- 🟠 HIGH — no retry logic, no idempotency, unbounded queues.
- 🟡 MEDIUM — missing monitoring, overlapping runs, poor logging.
- 🔵 LOW — scheduling could be optimized, naming inconsistencies.
- ⚪ INFO — best practice recommendations.
Phase 9 — Final report
# Background Job Summary
# Job Inventory
# Error Handling
# Idempotency
# Concurrency
# Scheduling
# Monitoring
# Critical Issues
# High Priority Issues
# RecommendationsGuardrails, always: every job must have error handling; log job start and completion; implement retry with backoff for transient failures; ensure idempotency where possible; monitor queue depth and failure rates; don't schedule jobs without considering timezone changes; handle overlapping runs; and don't let queues grow unbounded.
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.

