codex/skills/cron/SKILL.md
Create/manage Codex app automations in local SQLite (~/.codex/sqlite/codex-dev.db). Use to add, list, update, enable/disable, delete, run now, edit names/prompts/RRULE/cwd scopes, or inspect automation records while troubleshooting.
npx skillsauth add tkersey/dotfiles cronInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill to manage Codex automations through the native Zig cron CLI. Runtime paths are Zig-only (no Python fallback, no shell launchd wrappers).
When iterating on cron, use these two repos:
skills-zig ($HOME/workspace/tk/skills-zig): source for the cron binary, build/test wiring, release tags.homebrew-tap ($HOME/workspace/tk/homebrew-tap): formula/checksum updates for released binaries.run_cron_tool() {
install_cron_direct() {
local repo="${SKILLS_ZIG_REPO:-$HOME/workspace/tk/skills-zig}"
if ! command -v zig >/dev/null 2>&1; then
echo "zig not found. Install Zig from https://ziglang.org/download/ and retry." >&2
return 1
fi
if [ ! -d "$repo" ]; then
echo "skills-zig repo not found at $repo." >&2
echo "clone it with: git clone https://github.com/tkersey/skills-zig \"$repo\"" >&2
return 1
fi
if ! (cd "$repo" && zig build build-cron -Doptimize=ReleaseFast); then
echo "direct Zig build failed in $repo." >&2
return 1
fi
if [ ! -x "$repo/zig-out/bin/cron" ]; then
echo "direct Zig build did not produce $repo/zig-out/bin/cron." >&2
return 1
fi
mkdir -p "$HOME/.local/bin"
install -m 0755 "$repo/zig-out/bin/cron" "$HOME/.local/bin/cron"
}
local os="$(uname -s)"
if command -v cron >/dev/null 2>&1 && cron --help 2>&1 | grep -q "cron.zig"; then
cron "$@"
return
fi
if [ "$os" = "Darwin" ]; then
if ! command -v brew >/dev/null 2>&1; then
echo "homebrew is required on macOS: https://brew.sh/" >&2
return 1
fi
if ! brew install tkersey/tap/cron; then
echo "brew install tkersey/tap/cron failed." >&2
return 1
fi
elif ! (command -v cron >/dev/null 2>&1 && cron --help 2>&1 | grep -q "cron.zig"); then
if ! install_cron_direct; then
return 1
fi
fi
if command -v cron >/dev/null 2>&1 && cron --help 2>&1 | grep -q "cron.zig"; then
cron "$@"
return
fi
echo "cron binary missing or incompatible after install attempt." >&2
if [ "$os" = "Darwin" ]; then
echo "expected install path: brew install tkersey/tap/cron" >&2
else
echo "expected direct path: SKILLS_ZIG_REPO=<skills-zig-path> zig build build-cron -Doptimize=ReleaseFast" >&2
fi
return 1
}
run_cron_tool listrun_cron_tool show --id <id>run_cron_tool create --name "Weekly release notes" --prompt-file /path/to/prompt.md --rrule "RRULE:FREQ=WEEKLY;BYDAY=FR;BYHOUR=9;BYMINUTE=0"run_cron_tool update --id <id> --rrule "RRULE:FREQ=DAILY;BYHOUR=9;BYMINUTE=0"run_cron_tool enable --id <id> or run_cron_tool disable --id <id>run_cron_tool run-now --id <id>run_cron_tool delete --id <id>run_cron_tool run-duerun_cron_tool run-due --dry-runrun_cron_tool scheduler installrun_cron_tool scheduler uninstallrun_cron_tool scheduler statusRuntime bootstrap policy mirrors seq/cas/lift: require the Zig binary, default to Homebrew install on macOS, and fallback to direct Zig install from skills-zig on non-macOS.
Subcommand --help prints top-level usage. For detailed options, use the matrix below.
cwds). Default is current repo if omitted on create.--prompt-file for multi-line prompts).cron.cron scheduler install.cron run-due executes due automations by calling codex exec and updates:
automations.last_run_atautomations.next_run_atautomation_runs rowscron run-due --dry-run is read-only:
automation_runs rows are inserted/updatedautomations.last_run_at/next_run_at updatesmemory.md writes--codex-bin accepts executable name or absolute path (default resolves $CODEX_BIN or codex in PATH).--lock-label, or env CRON_LAUNCHD_LABEL).--lock-label uses strict label validation: only [A-Za-z0-9._-] (no slashes/spaces).run-due default batch limit is 10 automations per invocation (--limit overrides).~/Library/LaunchAgents/<label>.plist directly from Zig.run-due with default DB path and default limit unless you invoke cron manually with overrides.~/Library/Logs/codex-automation-runner/out.log and ~/Library/Logs/codex-automation-runner/err.log.list: --status <ACTIVE|PAUSED>, --jsonshow: --id <id> or --name <name>, optional --jsoncreate: --name, --prompt|--prompt-file, --rrule, optional --status, --cwd (repeatable), --cwds-json, --clear-cwds, --next-run-atupdate: --id|--name, optional --new-name, --prompt|--prompt-file, --rrule, --status, --cwd (repeatable), --cwds-json, --clear-cwds, --next-run-at, --clear-next-run-atenable|disable|run-now|delete: --id or --namerun-due: optional --id, --limit, --dry-run, --codex-bin, --lock-label ([A-Za-z0-9._-] only)scheduler install: optional --label, --interval-seconds, --path, --codex-binscheduler uninstall|status: optional --label--label is strict: only [A-Za-z0-9._-] (no slashes/spaces).Ask questions only when the request is ambiguous or when the user explicitly asks for guidance. Do not block otherwise.
Essential elements to confirm or infer:
RRULE: prefix).cwds), default to current repo if not specified.ACTIVE.When ambiguous, ask for missing details. Examples:
cwd.RRULE:-prefixed form.FREQ=...) are still accepted at run time for compatibility.BYHOUR/BYMINUTE are interpreted in UTC.HOURLY requires BYMINUTEDAILY requires BYHOUR and BYMINUTEWEEKLY requires BYDAY, BYHOUR, and BYMINUTEExample rules:
RRULE:FREQ=DAILY;BYHOUR=9;BYMINUTE=0RRULE:FREQ=WEEKLY;BYDAY=FR;BYHOUR=9;BYMINUTE=0RRULE:FREQ=HOURLY;INTERVAL=24;BYMINUTE=0Name: Summarize yesterday's git activity
Prompt: Summarize yesterday's git activity for standup. Include notable commits, files touched, and any risks or follow-ups.
Schedule: RRULE:FREQ=DAILY;BYHOUR=9;BYMINUTE=0
Name: Draft weekly release notes
Prompt: Draft weekly release notes from merged PRs. Include links when available and group by area.
Schedule: RRULE:FREQ=WEEKLY;BYDAY=FR;BYHOUR=9;BYMINUTE=0
Name: Summarize CI failures
Prompt: Summarize CI failures and flaky tests from the last CI window, group by root cause, and suggest minimal fixes.
Schedule: RRULE:FREQ=DAILY;BYHOUR=8;BYMINUTE=30
See references/db.md for schema and field notes.
testing
Use before local patching when bugs, regressions, malformed state, crashes, parser failures, migrations, cache drift, protocol problems, compatibility requests, tolerant readers, fallbacks, coercions, retries, catch-and-continue logic, or local workarounds may broaden accepted invalid state.
testing
Use for bug reports, PR/issue prose, reviewer comments, user diagnoses, generated summaries, memories, retrieved context, public tracker context, claimed root causes, proposed fixes, fake-minimal repro risk, or any investigation where natural-language context could anchor the implementation scope.
development
Use when non-trivial work needs Challenge Escalation, latent-intelligence activation, frame-market selection, doctrine operators, dominant-move selection, ablation/surface-tax judgment, reification, review comment law, negative capability, route receipts, or proof-bearing refusal to mutate.
development
Apply Algebra-Driven Design. Use for ADD, denotational design, combinator models, law-driven architecture, domain algebra, property tests, codebase modeling, event sourcing, workflow design, or agentic skill design. If the canonical bundle is unavailable, use this wrapper as the minimal ADD kernel and report the missing bundle path.