2026-07-15 · 6 min read · Rahul Chitturi
- cron
- kubernetes
- operations
Kubernetes CronJobs look simple until one run is still active when the next schedule arrives. Depending on concurrencyPolicy, the controller may allow overlap, skip the new run, or replace the old one. Add timezones, missed start deadlines, and retrying Jobs, and a daily task can silently process data twice or not at all.
Debugging starts with the schedule contract: when should the job run, what should happen if the previous run is late, and whether backfills are safe. Then compare that contract with the actual CronJob spec and Job history.
Inspect the scheduling knobs
A CronJob incident should include the schedule, timezone assumption, concurrency policy, starting deadline, suspend flag, and recent Job statuses. Those fields explain most overlap and missed-run reports before you inspect application logs.
- Confirm whether the schedule is interpreted in UTC or a configured timeZone
- Check concurrencyPolicy: Allow, Forbid, or Replace
- Review startingDeadlineSeconds for missed controller windows
- Compare successfulJobsHistoryLimit and failedJobsHistoryLimit with available evidence
Design for safe recovery
If a missed run requires a manual backfill, make the command idempotent before executing it. Use explicit date ranges, dry-run output, and a clear record of which scheduled window is being replayed. Otherwise a recovery script can cause the duplicate processing the CronJob policy was meant to prevent.
Diff the CronJob manifest before and after changes. Small edits to schedule strings, resource limits, or image tags can change run duration enough to expose concurrency behavior that never appeared in staging.
A Flashman workflow
Use the cron helper to preview expected run times, the timestamp converter to align controller events with app logs, the JSON formatter for Kubernetes API output, and the diff tool to review manifest changes.
Keep the debugging note concrete: expected schedule, observed Jobs, chosen recovery window, and the exact manifest field changed after the incident.