Hardens scheduled jobs (cron, systemd timers, task queues) against overlapping runs, double-processing, and silent failures. Use when writing, reviewing, or fixing a recurring job: idempotency, overlap locks, timeouts, logging, and dead man's switch alerting.
./install.sh cron-disciplinename: cron-discipline description: Hardens scheduled jobs (cron, systemd timers, task queues) against overlapping runs, double-processing, and silent failures. Use when writing, reviewing, or fixing a recurring job: idempotency, overlap locks, timeouts, logging, and dead man's switch alerting. metadata: { "includeInPrompt": true }
Scheduled jobs fail in three boring ways: they run twice at once and corrupt data, they run twice over time and double-send, and they silently stop running. This skill fixes all three: one instance at a time, re-runs that are safe by construction, and an external alarm that fires on silence.
bin/cron_wrap.sh.references/idempotency.md: dedup keys with unique constraints, atomic work-claims, business keys.timeout every job; set -euo pipefail; absolute paths; log start, end, exit code, and items processed to a file, never to the void.references/silence_alerting.md. The job pings an external monitor on start, success, and failure. Silence after the expected period is the alarm, and it survives the host dying.A hardened job ships with: a single-instance lock, an idempotency mechanism named in writing (dedup key, atomic claim, or business key), a runtime timeout, a log line per run (name, run id, scheduled vs start vs end, status, items), a heartbeat ping URL registered on an external monitor, and a note of which induced-failure test was run and what happened.
SELECT ... FOR UPDATE SKIP LOCKED).publisher key 2e43c913833850e6d80f939677e3de76e806d47785c0f1caaca90f9d18c98e1e
No ratings yet — be the first to rate it.