coding · Claude Code · free
Design a scheduled job for [TASK DESCRIPTION] that doesn't wake me at 3am. What it does: [DESCRIBE] Frequency: [EVERY N MINUTES / DAILY AT X / WEEKLY / OTHER] Time critical? [Y / N — window in minutes] Runtime host: [K8S CRONJOB / CLOUD SCHEDULER / SIDECAR CRON / VERCEL CRON / GITHUB ACTIONS] Idempotent? [Y / N — if N, we have work to do] Design: 1. Timezone — always UTC in the schedule, human readable name in comments 2. Idempotency — dedupe key (date bucket + job name); refuse to run twice for the same bucket 3. Overlap protection — distributed lock (Redis / DB row) with a TTL longer than the worst case run 4. Missed run policy — catch up N previous windows on wake up, or skip; document the choice 5. Timeout — hard kill at 2x expected duration; kill politely first (SIGTERM), then SIGKILL 6. Observability — one log line at start, one at end with duration + rows touched; a metric of last success timestamp 7. Alerting — page ONLY on: last success…
#cron #scheduling #reliability