Every DevOps and SRE engineer has been paged at 3 AM by a cron job that either ran 60 times in an hour, ran in the wrong timezone, or quietly stacked 40 overlapping pods until the cluster OOM-killed a node.
After debugging dozens of broken crontab lines and Kubernetes CronJob manifests in production, here are the 7 most common Cron & K8s CronJob pitfalls—plus a 100% browser-local interactive explainer and YAML generator I built so you can verify your next 10 run timestamps before deploying.
1. Mixing Up concurrencyPolicy: Allow (The Default!)
In Kubernetes, if you omit concurrencyPolicy, it defaults to Allow.
If a nightly database sync or billing reconciliation job runs every 5 minutes (*/5 * * * *) and suddenly takes 12 minutes due to an upstream slowdown, Kubernetes will happily spawn overlapping pods every 5 minutes—compounding database lock contention until everything collapses.
Fix: Always declare concurrencyPolicy: Forbid (skip next run while active) or Replace (terminate old run and start fresh):
apiVersion: batch/v1 kind: CronJob metadata: name: nightly-reconcile spec: schedule: "*/5 * * * *" concurrencyPolicy: Forbid startingDeadlineSeconds: 120 2. The Classic Day-of-Month + Day-of-Week OR Trap
Many developers write:
0 9 1-7 * 1 expecting "9:00 AM on the first Monday of the month."
In standard Vixie cron (and Kubernetes), when both Day-of-Month (1-7) and Day-of-Week (1) are non-wildcard (*), cron treats them as an OR, not an AND! That expression runs on days 1 through 7 AND every single Monday of the month.
Fix: Run on 0 9 1-7 * * and check [ "$(date +%u)" -eq 1 ] inside your script, or verify the exact next 10 execution dates before shipping.
3. Forgetting timeZone (UTC vs Local DST Drift)
By default, Kubernetes CronJob schedules execute in the kube-controller-manager timezone (almost always UTC). Hardcoding an offset like 0 16 * * 1-5 for "9 AM Pacific" will silently drift by an hour twice a year when Daylight Saving Time shifts.
Fix (Kubernetes 1.27+): Explicitly set spec.timeZone using an IANA timezone string:
spec: schedule: "0 9 * * 1-5" timeZone: "America/Los_Angeles" 4. Missing startingDeadlineSeconds After Controller Outages
If the Kubernetes control plane misses more than 100 scheduled runs (e.g., during a pause or outage) and startingDeadlineSeconds is unset, the CronJob controller logs an error and stops scheduling the job entirely.
Fix: Set a realistic startingDeadlineSeconds (e.g., 200 seconds) alongside backoffLimit and activeDeadlineSeconds on the inner jobTemplate.
5. Forgetting History Limits (Zombie Pod Accumulation)
Without successfulJobsHistoryLimit and failedJobsHistoryLimit, clusters accumulate completed Job/Pod objects and etcd bloat—especially on high-frequency */1 or */5 schedules.
spec: successfulJobsHistoryLimit: 3 failedJobsHistoryLimit: 3 6. Writing * */2 * * * Instead of 0 */2 * * *
Putting * in the minute field when you meant "every 2 hours" triggers the job every single minute during every even hour (60 executions per 2-hour window instead of 1). Always pin minute to 0 (or a jittered minute like 17) unless you genuinely want per-minute execution.
7. Running CronJob Containers as root with Writable Filesystems
Scheduled batch jobs often hold elevated credentials (database dump keys, S3 backup roles, billing API tokens). Leaving them as root with a writable root filesystem expands blast radius dramatically.
Fix: Apply the same CIS hardening you use on Deployments:
securityContext: runAsNonRoot: true runAsUser: 10001 readOnlyRootFilesystem: true allowPrivilegeEscalation: false capabilities: drop: ["ALL"] Try the Free Interactive Cron Explainer & K8s CronJob Generator
To make verifying schedules and generating hardened Kubernetes batch/v1 manifests effortless, I built a 100% browser-local tool (no backend, zero telemetry):
- Try it free here: Cron Expression Explainer & K8s CronJob Builder
- Instantly translates any 5-field cron expression into plain English
- Computes the next 10 exact execution timestamps in UTC or your local timezone
- Generates a ready-to-apply, CIS-hardened Kubernetes
CronJobYAML (concurrencyPolicy,timeZone,startingDeadlineSeconds,securityContext, resource limits) with one-click copy
Also check out my other free DevOps & SRE browser tools:
- SRE SLO Error Budget & Prometheus Burn-Rate Alert Generator
- Kubernetes & Dockerfile CIS Security Auditor (12 Local Checks)
Want the Complete Production Starter Pack?
If you want the full copy-paste production kit—including hardened Dockerfiles, Kubernetes Helm charts, Terraform AWS VPC/EKS modules, Prometheus SLO burn-rate alerts, and GitHub Actions CI/CD pipelines—grab the SaaS Deploy & SRE Starter Pack 2026 (use code PH20 for 20% off → $15.20):
- Gumroad: SaaS Deploy & SRE Starter Pack 2026 (
PH20) - Ko-fi (Direct Stripe / Apple Pay): SaaS Deploy & SRE Starter Pack 2026 (
PH20) - All-Access 5-in-1 Indie Founder Bundle ($19.20 with
PH20): Ko-fi | Gumroad
What's the nastiest cron bug that has ever paged your team? Drop it in the comments!
