---
title: "Kubernetes CronJob schedule: monitor every run"
url: "https://cronmissed.com/guides/kubernetes-cronjob.md"
canonical_url: "https://cronmissed.com/guides/kubernetes-cronjob"
last_updated: "2026-11-10"
type: "how-to"
summary: "A Kubernetes CronJob stops creating jobs after 100 missed schedules and can run a job twice. Ping from the container to see both."
related: ["https://cronmissed.com/guides.md", "https://cronmissed.com/guides/aws-eventbridge.md", "https://cronmissed.com/learn/overlapping-cron-runs.md", "https://cronmissed.com/tools/snippet-builder.md", "https://cronmissed.com/learn/cron-time-zones-and-dst.md"]
---

# Kubernetes CronJob schedule: monitor every run

> **For AI agents:** the complete index of CronMissed pages is [llms.txt](https://cronmissed.com/llms.txt). Every page is also served as markdown at its URL plus .md.

A Kubernetes CronJob stops creating jobs after 100 missed schedules and can run a job twice. Ping from the container to see both.

A Kubernetes CronJob gives up silently when the controller has missed more than 100 schedules, counts suspended time as missed, and can create two jobs for one schedule. Ping from inside the container and the gaps show up as late checks.

## How can a scheduled job fail silently on Kubernetes CronJobs?

- If the controller counts more than 100 missed schedules since the last run, it does not start the job and only logs the error "too many missed start times". For a CronJob that runs every minute, an outage of about 100 minutes is enough.
- Time spent suspended counts as missed. When you set spec.suspend back to false on a CronJob without a starting deadline, missed jobs are scheduled immediately.
- With concurrencyPolicy: Forbid, a run that is still going when the next one is due makes that schedule count as missed, so a slow job quietly loses runs.
- Kubernetes warns that a CronJob can occasionally create two jobs for one schedule, or none, which is why the jobs you define should be idempotent.
- Only a few finished jobs are kept: the defaults are 3 successful and 1 failed, so the evidence of an old failure is gone soon after.

## What are the limits of Kubernetes CronJobs?

| Limit | What the documentation says |
| --- | --- |
| startingDeadlineSeconds | Optional. Without it, job occurrences have no deadline. Values under 10 seconds can stop the CronJob from being scheduled, because the controller checks every 10 seconds. |
| Missed-schedule counter | More than 100 missed schedules stops the job from starting. With startingDeadlineSeconds set, only the misses inside that window are counted. |
| concurrencyPolicy | Allow (the default), Forbid or Replace. |
| History limits | successfulJobsHistoryLimit defaults to 3 and failedJobsHistoryLimit defaults to 1. |
| Time zone | Set spec.timeZone to an IANA name. Putting TZ or CRON_TZ inside spec.schedule is not supported and fails validation; without spec.timeZone the schedule follows the controller's time zone. |

## How do you add a CronMissed ping to Kubernetes CronJobs?

The manifest below sends the start ping, runs the job, and sends the exit status as the last request. It sets `concurrencyPolicy: Forbid` and `backoffLimit: 0` so one schedule is one attempt, and it keeps the ping URL in a Secret.

```
apiVersion: batch/v1
kind: CronJob
metadata:
  name: report-sync
spec:
  schedule: '*/10 * * * *'
  timeZone: 'UTC'
  concurrencyPolicy: Forbid
  jobTemplate:
    spec:
      backoffLimit: 0
      template:
        spec:
          restartPolicy: Never
          containers:
            - name: job
              image: your-image:latest
              env:
                - name: PING_URL
                  valueFrom:
                    secretKeyRef: { name: cronmissed, key: ping-url }
              command: ['/bin/sh', '-c']
              args:
                - |
                  curl -fsS --max-time 10 --retry 5 --retry-connrefused -o /dev/null "$PING_URL/start"
                  /app/run-report
                  status=$?
                  curl -fsS --max-time 10 --retry 5 --retry-connrefused -o /dev/null "$PING_URL/$status"
                  exit $status
```

## How do you write the schedule of a Kubernetes CronJob?

Set `spec.schedule` to a five-field cron expression, and `spec.timeZone` to an IANA name to run in that zone. Without `spec.timeZone` the schedule follows the controller's time zone.

```
spec:
  schedule: "*/10 * * * *"
  timeZone: "UTC"
```

The [cron expression translator](https://cronmissed.com/tools/cron-explainer.md) reads a schedule before you apply it, and the [next run calculator](https://cronmissed.com/tools/next-run-calculator.md) previews its runs across a clock change.

## Which check settings fit Kubernetes CronJobs?

Use a cron check with the CronJob's schedule and the time zone you set in spec.timeZone. Give it a grace slightly longer than the usual run time plus the time a pod needs to start, often 5 minutes. A start ping is worth adding on every CronJob: it separates "the pod never ran" from "the pod started and hung".

## How do you confirm the check works?

1. Apply the manifest and trigger a run with kubectl create job --from=cronjob/report-sync test-run, then confirm the start and success pings.
2. Suspend the CronJob with kubectl patch for longer than its grace and confirm the check goes down.
3. Make the container exit with status 3 and confirm the check goes down immediately with the /3 ping.

## Questions

### Does a failed pod show up as a failed check?

Yes, when the job reports its exit status. The wrapper sends the status to /<status>, and any value other than 0 marks the check down at once. A pod that is killed before it can ping is caught by the grace time instead.

### What should startingDeadlineSeconds be?

Long enough to cover a short controller outage and short enough that a stale run is not worth starting. A common choice is a fraction of the schedule gap, but never under 10 seconds. The check's grace should be longer than this deadline so a late start is not reported twice.

## Sources

- [Kubernetes documentation: CronJob](https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/), read 22 October 2026

## Related pages

- [AWS EventBridge Scheduler and Lambda](https://cronmissed.com/guides/aws-eventbridge.md)
- [Overlapping cron runs](https://cronmissed.com/learn/overlapping-cron-runs.md)
- [/tools/snippet-builder](https://cronmissed.com/tools/snippet-builder.md)
- [Cron time zones and daylight saving](https://cronmissed.com/learn/cron-time-zones-and-dst.md)

## Related

- [Monitor cron jobs on every platform: 24 guides](https://cronmissed.com/guides.md)
- [Monitor AWS EventBridge schedules and Lambda](https://cronmissed.com/guides/aws-eventbridge.md)
- [How to stop overlapping cron job runs](https://cronmissed.com/learn/overlapping-cron-runs.md)
- [Cron monitoring snippet builder](https://cronmissed.com/tools/snippet-builder.md)
- [Cron time zones and daylight saving time](https://cronmissed.com/learn/cron-time-zones-and-dst.md)
