TECHNOLOGY

Keep overlapping scheduled inference runs intentional

In this article
THE QUICK TAKE

Choose CronJob overlap by the usefulness of old work and keep publication coordination independent of controller concurrency.

A scheduled embedding refresh is still writing results when its next schedule arrives. CronJob concurrencyPolicy decides how runs from that CronJob overlap, but it does not provide a global storage lock or make an inference program idempotent. The right choice depends on whether old work remains useful when a newer run becomes eligible.

Identify the protected owner

Follow each Job’s owner reference to the CronJob. Concurrency policy applies to Jobs created by the same CronJob, not every workload with a similar label or output path. A manual Job or another CronJob can still write concurrently. Document the output namespace and any application coordination separately from this controller setting.

Compare the three policies

Allow permits overlapping runs. Forbid skips a new run while an earlier owned Job is active. Replace replaces the active Job with the newly scheduled one. These choices trade coverage, freshness and interruption differently. Forbid does not queue an unlimited backlog of every missed dataset snapshot, and Replace does not declare the interrupted output complete.

Preserve termination boundaries

Replacing a Job triggers workload termination, which still has a lifecycle. An old worker can be cleaning up or have already sent an external write when its replacement begins preparation. Build publication around run identities and accepted generations instead of assuming policy selection creates an instantaneous handover between two processes or cancels already accepted remote operations.

Relate duration to eligibility

Compare actual run duration with schedule frequency, starting-deadline behavior and observed controller events. A frequently skipped run can be the intended result of Forbid, not scheduler failure. A long duration can reflect resource waiting or startup as well as inference. Preserve the reason for each absent or replaced run rather than counting schedules as guaranteed executions.

Test overlap deliberately

Use a disposable CronJob whose synthetic worker runs across the next schedule. Observe owned Jobs and output markers under the chosen policy, including an interrupted publication. Success means the observed overlap and accepted result generation match the intended freshness contract. It does not establish exactly-once scheduling, a cross-workload mutex or correctness of the refreshed model data.

Primary references

Kubernetes CronJob.

CronJob API.

Kubernetes Jobs.

Related reading: Retrying generation POSTs: idempotency must be explicit; Graceful inference-server termination with active streams.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles