Headless Cron Creator logo

Headless Cron Creator

Community
notque
headless-cron-creator

Generate headless Claude Code cron jobs with safety.

Overview

Publishernotque
Repositoryvexjoy-agent
Skill nameheadless-cron-creator
Stars
443
Forks
50
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by notque on GitHub. Read the source before you install it.

Installation

Install the Headless Cron Creator AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/notque/vexjoy-agent/tree/main/skills/infrastructure/headless-cron-creator
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/notque/vexjoy-agent.git /tmp/vexjoy-agent
mkdir -p .claude/skills
cp -r /tmp/vexjoy-agent/skills/infrastructure/headless-cron-creator .claude/skills/headless-cron-creator
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Headless Cron Creator in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Headless Cron Creator on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Headless Cron Creator is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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 cd before 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 InputCron Expression
every 12 hours7 */12 * * *
twice daily7 8,20 * * *
hourly23 * * * *
daily at 6am7 6 * * *
weekly on sunday7 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.

bash
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 pipefail
  • flock lockfile -- 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
  • --allowedTools
  • tee to 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.

  1. Run the script in dry-run mode:

    bash
    bash -n scripts/{name}-cron.sh  # syntax check
  2. Run cron-job-auditor checks:

    • 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)

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.

  1. Show the proposed entry:

    bash
    python3 ~/.claude/scripts/crontab-manager.py add \
      --tag "{name}" \
      --schedule "{schedule}" \
      --command "{absolute_script_path} --execute >> {logdir}/cron.log 2>&1" \
      --dry-run
  2. Ask the user for confirmation before installing. Never install without explicit approval.

  3. If confirmed:

    bash
    python3 ~/.claude/scripts/crontab-manager.py add \
      --tag "{name}" \
      --schedule "{schedule}" \
      --command "{absolute_script_path} --execute >> {logdir}/cron.log 2>&1"
  4. Verify:

    bash
    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/cron-job-auditor/SKILL.md -- validation checks for generated scripts

Frequently asked questions

What does the Headless Cron Creator AI skill do?

Generate headless Claude Code cron jobs with safety.

Why use Headless Cron Creator on TypingMind?

Because you install it once and use it with any model. Headless Cron Creator is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Headless Cron Creator in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/notque/vexjoy-agent/tree/main/skills/infrastructure/headless-cron-creator. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Headless Cron Creator?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Headless Cron Creator?

As many as you like. As long as a model supports skills, you can use Headless Cron Creator with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Headless Cron Creator AI skill free?

Yes. It is published on GitHub by notque under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇