Learn the vocabulary of running a recurring, scheduled task natively as a cluster workload.
0 / 5 completed
1 / 5
At standup, a dev mentions a Kubernetes object that creates a new Job automatically on a recurring schedule defined by a cron expression, rather than a person running a script manually. What is this object called?
A CronJob creates a new Job automatically on a recurring schedule defined by a cron expression, rather than requiring a person to trigger a script manually at the same time every day. A Deployment keeps a fixed set of replicas running continuously, which is a fundamentally different pattern from creating a fresh, scheduled unit of work. This automated scheduling is what lets a recurring task, like a nightly report, run reliably without manual intervention.
2 / 5
During a design review, the team wants to prevent a new scheduled run from starting while a previous run of the same CronJob is still in progress. Which capability supports this?
A concurrencyPolicy of Forbid prevents a new scheduled run from starting while a previous run of the same CronJob is still in progress, avoiding two overlapping runs from operating on the same data at once. A concurrencyPolicy that always allows a new run regardless of an in-progress one risks exactly that kind of overlap. This concurrency control is essential whenever a scheduled task isn't safe to run more than once at the same time.
3 / 5
In a code review, a dev notices a CronJob configured with a startingDeadlineSeconds value, so a run that missed its scheduled window by more than that deadline is skipped instead of started late. What does this represent?
The startingDeadlineSeconds setting bounds how late a missed scheduled run can still start, skipping it entirely once that deadline has passed rather than running it arbitrarily late. Starting a missed run no matter how late it is risks it executing at a time that no longer makes sense for what the task was meant to do. This deadline is what keeps a CronJob's behavior predictable after a temporary controller outage or delay.
4 / 5
An incident report shows a nightly billing job corrupted data because two overlapping runs executed simultaneously, since the CronJob's concurrencyPolicy had been left at its default of Allow. What practice would prevent this?
Setting the CronJob's concurrencyPolicy to Forbid or Replace prevents a new run from starting while a previous one is still in progress, eliminating the overlap risk entirely for a task that isn't safe to run concurrently with itself. Leaving concurrencyPolicy at Allow is exactly what let the two overlapping billing runs corrupt data in this incident. This concurrency setting is a critical configuration choice for any CronJob whose task could take longer than the interval between scheduled runs.
5 / 5
During a PR review, a teammate asks why the team uses a Kubernetes CronJob for a recurring nightly report instead of an external cron server hitting an application endpoint over the network. What is the reasoning?
A CronJob runs as a native cluster workload with the same scheduling, retry, and history-tracking mechanisms as any other Job, keeping the recurring task's lifecycle managed entirely within the cluster. An external cron server hitting an application endpoint introduces an extra network hop and a separate system that itself needs to stay available and secured. The tradeoff is that a CronJob's scheduling still depends on the cluster's own control plane being healthy, which is a dependency an external scheduler wouldn't share.