headless-cron-creator
Skill448 starsChanged 5 days agoMITView on GitHub
Generate headless Claude Code cron jobs with safety.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- notque/claude-code-toolkitword for word, first seen Oct 8, 2026
Other versions1 project uses a version of this.
Word for word · 1
- notque/claude-code-toolkit★ 448100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
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 repository64 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- assessmentSkill
- dataSkill
- business-opsSkill
- code-qualitySkill
- comment-qualitySkill
- condenseSkill
- joy-checkSkill
- content-engineSkill
- contentSkill
- headlinesSkill
- image-genSkill
- image-to-videoSkill
- series-plannerSkill
- topic-brainstormerSkill
- video-editingSkill
- writingSkill
- domainSkill
- cli-designSkill
- frontendSkill
- frontend-slidesSkill
- jev-designSkill
- webgl-card-effectsSkill
- game-asset-generatorSkill
- game-devSkill
- game-trailerSkill
- motion-pipelineSkill
- browser-jev-automationSkill
- cve-source-checkSkill
- deploySkill
- endpoint-validatorSkill
- kubernetesSkill
- githubSkill
- accountsSkill
- auto-dreamSkill
- building-with-jevSkill
- codexSkill
- docs-sync-checkerSkill
- doSkill
- dSkill
- grill-jevSkill
- toolkitSkill
- workflow-helpSkill
- debuggingSkill
- plant-seedSkill
- processSkill
- pr-workflowSkill
- quickSkill
- testingSkill
- with-anti-rationalizationSkill
- workflowSkill
- worktree-agentSkill
- programmingSkill
- architecture-deepeningSkill
- codebase-analyzerSkill
- markdown-converterSkill
- news-collectionSkill
- researchSkill
- roastSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 5 are distinctive, and 3 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.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 59
Gate: All required parameters extracted.
- Very specific: line 63
Create the wrapper script using crontab-manager.py generate-wrapper.
- Very specific: line 86
Do not use the CronCreate tool -- it is session-scoped (dies when the session ends, auto-expires after 7 days).
- Distinctive: line 92
Verify the generated script meets cron best practices.
- Distinctive: line 94
Run the script in dry-run mode:
- Distinctive: line 107
Gate: All checks pass. Proceed to Phase 4.
- Distinctive: line 122
Ask the user for confirmation: before installing. Never install without explicit approval.
- Very specific: line 167
If the path changes, regenerate the wrapper with --force.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Headless Cron Creator Skill
Generate headless Claude Code cron jobs from a task description and schedule. Creates a wrapper script with safety mechanisms (lockfile, budget cap, dry-run default, logging) and installs crontab entries. All crontab mutations go through scripts/crontab-manager.py, which writes to temp files and creates timestamped backups in ~/.claude/crontab-backups/ before every change -- never pipe directly to crontab - because a mid-stream pipe failure wipes the entire crontab.
Instructions
Phase 1: PARSE
Extract job parameters from the user's request.
Required parameters:
- name -- short kebab-case identifier (e.g.,
reddit-automod,feed-health-check) - prompt -- what Claude should do each run (natural language)
- schedule -- cron expression or human-readable interval
Optional parameters (with defaults):
- workdir -- where to
cdbefore running (default: current repo root) - budget -- max USD per run (default:
2.00; user may override) - allowed-tools -- which tools the headless session can use (default:
Bash Read; user may override) - logdir -- where to store logs (default:
{workdir}/cron-logs/{name})
Human-readable schedule conversion -- use off-minutes (7, 23, 47) instead of :00/:30 because every cron job on the system fires at round minutes, creating load spikes:
| Human Input | Cron Expression |
| every 12 hours | 7 */12 * * * |
| twice daily | 7 8,20 * * * |
| hourly | 23 * * * * |
| daily at 6am | 7 6 * * * |
| weekly on sunday | 7 9 * * 0 |
| every 30 minutes | */30 * * * * |
Gate: All required parameters extracted. Proceed to Phase 2.
Phase 2: GENERATE
Create the wrapper script using crontab-manager.py generate-wrapper. Embed the prompt via bash heredoc to avoid escaping issues.
python3 ~/.claude/scripts/crontab-manager.py generate-wrapper \
--name "{name}" \
--prompt "{prompt}" \
--schedule "{schedule}" \
--workdir "{workdir}" \
--budget "{budget}" \
--allowed-tools "{allowed_tools}"Review the generated script. Verify it contains:
set -euo pipefailflocklockfile -- prevents concurrent runs of the same job--permission-mode auto-- never use--dangerously-skip-permissions(auto is sufficient) or--bare(breaks OAuth/keychain auth)--max-budget-usd-- caps spend per run (default 2.00 USD)--no-session-persistence--allowedToolsteeto per-run timestamped log file- Dry-run/execute toggle -- scripts do nothing destructive without
--execute - Exit code propagation via
PIPESTATUS[0]
Do not use the CronCreate tool -- it is session-scoped (dies when the session ends, auto-expires after 7 days). Use system crontab via crontab-manager.py instead.
Gate: Script generated and reviewed. Proceed to Phase 3.
Phase 3: VALIDATE
Verify the generated script meets cron best practices.
- Run the script in dry-run mode:
bash -n scripts/{name}-cron.sh # syntax check - Run
cron-job-auditorchecks:- Error handling (
set -e) - Lock file (
flock) - Logging (
tee,LOG_DIR) - Working directory (absolute
cd) - PATH awareness (absolute path to
claude-- cron has minimal PATH, so all commands must use absolute paths) - Cleanup on exit (lock release)
- Error handling (
Gate: All checks pass. Proceed to Phase 4.
Phase 4: INSTALL
Install the crontab entry. Every entry gets a # claude-cron: <tag> marker so crontab-manager.py can identify and manage only its own entries without touching non-Claude crontab lines. All paths in the crontab entry must be absolute because cron has minimal PATH.
- Show the proposed entry:
python3 ~/.claude/scripts/crontab-manager.py add \ --tag "{name}" \ --schedule "{schedule}" \ --command "{absolute_script_path} --execute >> {logdir}/cron.log 2>&1" \ --dry-run - Ask the user for confirmation before installing. Never install without explicit approval.
- If confirmed:
python3 ~/.claude/scripts/crontab-manager.py add \ --tag "{name}" \ --schedule "{schedule}" \ --command "{absolute_script_path} --execute >> {logdir}/cron.log 2>&1" - Verify:
python3 ~/.claude/scripts/crontab-manager.py verify --tag "{name}"
Gate: Entry installed and verified. Proceed to Phase 5.
Phase 5: REPORT
Summarize the created cron job and print the exact commands to test and manage it.
Output:
- Script path
- Cron schedule (human-readable + expression)
- Log directory
- Budget per run
- Tag for management
- Commands for future management:
python3 ~/.claude/scripts/crontab-manager.py list # see all claude cron jobs python3 ~/.claude/scripts/crontab-manager.py verify --tag {name} # health check python3 ~/.claude/scripts/crontab-manager.py remove --tag {name} # uninstall
To modify an existing wrapper script, regenerate it with --force rather than editing in place.
Error Handling
Error: "tag already exists"
Cause: A cron entry with this tag is already installed.
Solution: Either remove --tag {name} first, or choose a different name.
Error: "claude: command not found" in cron
Cause: Cron has minimal PATH; claude isn't in it.
Solution: generate-wrapper resolves the absolute path to claude at generation time.
If the path changes, regenerate the wrapper with --force.
Error: "crontab install failed"
Cause: System crontab service issue.
Solution: Check crontab -l manually. Restore from ~/.claude/crontab-backups/.
References
scripts/crontab-manager.py-- all crontab mutations (add, remove, list, verify, generate-wrapper)skills/infrastructure/deploy/references/cron-automation.md-- validation checks for generated scripts
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.

