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"
}
cron_is_native_zig() {
command -v cron >/dev/null 2>&1 &&
cron --help 2>&1 | grep -q "Manage Codex automations with native Zig runtime"
}
local os="$(uname -s)"
if cron_is_native_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 ! cron_is_native_zig; then
if ! install_cron_direct; then
return 1
fi
fi
if cron_is_native_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.
tools
Invokes Apple's macOS 27 fm command-line tool from a local Mac to use the on-device system model or Private Cloud Compute, including instructions, image prompts, schema-constrained JSON, and noninteractive automation. Use when the user asks to run Apple Foundation Models through fm, compare system versus pcc, generate structured output, or automate fm without Swift or an app.
development
Compile historical Codex sessions into governed counterfactual evidence, evaluate an existing owner-applied candidate through blinded paired HCTP trials, and fold observable evidence into RUN, OBSERVE, or STOP. Use for `$hylo`, CRF extraction, counterfactual replay, source-governed direct or historical trials, sealed evidence, paired baseline/candidate evaluation, causal frontiers, or evidence-governed improvement.
testing
Ensure a `ledger` command is available on PATH; materialize, validate, record, replay, and project requested Actuating artifacts without taking semantic or execution authority; coordinate the shared Learnings/Synesthesia/Negative Ledger lifecycle checkpoint and repo-local source-memory reconciliation; address Universalist plans and receipts; and perform pure artifact validation.
testing
Classify and quotient review findings, failing tests, incidents, bug reports, migration failures, and other witnessed falsifiers against accepted intent and the current Construction. Author counterexample-set/v1 without selecting repairs, counting review credit, or granting mutation.