Monitor Kubernetes CronJobs by their business result, not just object status. Use a heartbeat from the container to prove the job reached its success path — with a buffer.
By H. Marcell, Freelance Software Developer
Updated July 17, 2026
H. Marcell is a freelance software developer who builds and runs web services and APIs, and writes about uptime monitoring, incident response, and status-page communication.
Kubernetes will tell you whether a CronJob was scheduled and whether its pods exited zero — but not whether the job actually did its job. This guide covers monitoring the business outcome of a CronJob with an external heartbeat, why cluster status alone is not enough, and how to pair the two for fast debugging when something is late.
The CronJob controller records successful and failed job runs, and you can watch pod phases and exit codes. But this tells you about the mechanics, not the meaning: a job can be marked successful while doing nothing useful, and — more dangerously — if the controller itself, the nodes, or the cluster network is down, there is nothing to emit an alert at all. Monitoring that lives inside the thing you are monitoring cannot report on its own failure.
Put a single call at the end of your job's happy path — after the export is written, the reconciliation is committed, whatever "done" means for this job. Because Sandglass is external, it holds the source of truth: if the heartbeat is late, something is wrong, whether that is a failed job, a paused CronJob, or a cluster-wide outage. When it alerts, use `kubectl get cronjob`, job history, and events to diagnose which of those it is.
Have the CronJob's container call a Sandglass heartbeat URL after the work completes successfully, with the interval set to the schedule plus a grace buffer. Because the signal originates outside the cluster, it still fires an alert when the whole cluster or the CronJob controller is unhealthy — the exact situation where in-cluster monitoring goes dark too.
Kubernetes status can show scheduling history and pod exit codes, but a pod exiting zero does not prove the job reached its success path — it may have skipped work, hit an empty queue, or logged an error and exited cleanly anyway. An external heartbeat placed after the real work is what proves the outcome, not just the process.
Decide which failures in this topic actually reach customers before adding any monitoring.
Match each risk to a single HTTP, content, TCP, SSL certificate, or heartbeat check instead of stacking duplicates.
Give each alert one owner and one destination — email, a Slack webhook, or a generic webhook.
Revisit intervals, thresholds, and ownership once a real incident shows what was missing.