Free forever, no credit card.Get Started for Free →
← All posts
November 30, 2026 · 6 min read

Does a Kubernetes CronJob Remember Between Runs? The Template Persists. Every Job Starts Fresh.

Does a Kubernetes CronJob Remember Between Runs? The Template Persists. Every Job Starts Fresh. A Kubernetes CronJob remembers its instructions perfectly and its experience not at all. The CronJob object itself is durable: it lives in the cluster's control plane, holding the schedule, the job template, and a small status block. Every run it produces, though, is a brand-new Job with brand-new Pods, created from that template as if no previous run had ever happened. Nothing a Pod learned, compute

Does a Kubernetes CronJob Remember Between Runs? The Template Persists. Every Job Starts Fresh.

A Kubernetes CronJob remembers its instructions perfectly and its experience not at all. The CronJob object itself is durable: it lives in the cluster's control plane, holding the schedule, the job template, and a small status block. Every run it produces, though, is a brand-new Job with brand-new Pods, created from that template as if no previous run had ever happened. Nothing a Pod learned, computed, or decided is carried into the next run unless something outside the Pod was deliberately written to durable storage. That split, durable template and disposable runs, is the whole memory model.

What actually persists: the CronJob object and its status

The CronJob spec is stored in etcd like every other Kubernetes object, so the schedule, the .spec.jobTemplate, the concurrency policy, and the suspension flag survive control plane restarts and are still there next week. The status block keeps two timestamps worth knowing: lastScheduleTime, the most recent time a Job was scheduled, and lastSuccessfulTime, the most recent time a Job completed successfully. Those two fields are the closest thing a CronJob has to a diary, and they are timestamps only. They say when runs happened, never what the runs found, produced, or should do differently next time.

The controller also uses lastScheduleTime for its own bookkeeping. On each check it counts how many schedules were missed since then, and if more than 100 were missed, it refuses to start a Job at all and logs an error instead. Setting startingDeadlineSeconds changes that accounting by bounding how late a missed run may still start. This is scheduling memory, not working memory: it protects the cadence, and it stores no content from any run.

The history limits: a short, deliberate audit trail

Finished Jobs do not accumulate forever. Two fields control retention: successfulJobsHistoryLimit, which defaults to 3, and failedJobsHistoryLimit, which defaults to 1. Once a new finished Job pushes the count past the limit, the controller deletes the oldest one, and its Pods go with it. Pod logs are readable only while the Pod object exists, so the default configuration keeps exactly three successful runs and one failed run available for inspection, and everything older is gone by design.

That makes Job history a debugging surface, not a memory system. Raising the limits buys a longer audit trail of exit codes and logs. It does not give the next run any way to read what the previous run concluded, because Jobs are never inputs to other Jobs. A run cannot open its predecessor's log, check its output, and adjust. The trail exists for humans looking backward, not for the workload looking forward.

Inside the run: Pods, retries, and the idempotency rule

Within a single Job, there is a small amount of continuity. A Job's backoffLimit, defaulting to 6, retries failed Pods with exponential backoff, and the Job tracks how many Pods have succeeded against its completions target. The concurrencyPolicy on the CronJob, Allow by default, or Forbid to skip a new run while the previous one is still active, or Replace to kill the running Job and start fresh, governs overlap between runs. None of this crosses the boundary between one scheduled occurrence and the next. The retry counter resets, the completion count resets, and the new Job starts from the template exactly as written.

Kubernetes states the consequence plainly in its own documentation: Jobs created by a CronJob should be idempotent, because circumstances exist where a schedule produces two Jobs or none. A workload that cannot know whether it already ran must be safe to run again, which means any real state, what was already processed, which records are done, what the last run decided, has to live somewhere the workload can check. The CronJob itself is not that somewhere.

Where run-to-run state actually goes

Operators who need continuity reach for the standard durable options. A PersistentVolumeClaim gives the Pod a filesystem that survives Pod deletion. A ConfigMap or Secret can carry small configuration values into every run. Most commonly, state goes outside the cluster object model entirely: a database row marking progress, an object in storage, a queue offset. Each option works, and each stores exactly what someone remembered to write, in a format someone has to maintain. The reasoning an AI agent did during a run, the context it gathered, the decisions it explained in its own output, fits none of these shapes naturally, so in practice it is usually not stored at all, and the next run re-derives it or does without.

The gap for scheduled AI agents

This design is sound for backups and report generation, where each run is genuinely independent. It becomes the central problem when the scheduled workload is an AI agent. An agent CronJob that reviews new signups every morning, triages a queue every hour, or audits a system every night starts each run as a stranger to its own history. It cannot recall that yesterday it flagged the same account, already asked a question, or learned how a particular system behaves. Handing it a volume or a database table stores files and rows, not a readable account of its own past work that it can search and reason over.

That is the gap Vilix AI is built to close for scheduled agents. Vilix AI is cloud-hosted memory that runs over MCP, so there is no infrastructure to deploy or operate: the agent in the Pod connects to the same memory endpoint as every other tool in the stack, and the memory is identical everywhere it is accessed. It stores full conversation history, not just extracted facts, so a run can read what a previous run actually said and decided, in context. The next Job a CronJob creates can open its first step by retrieving that history instead of reconstructing it, and close its last step by saving the new run back for the one after.

Getting started takes minutes: there is a free plan that stays free forever, and a 7-day Pro trial that needs no card. Everything stored can be exported or deleted at any time. The CronJob keeps doing what it is good at, firing on schedule with a durable template. Vilix AI supplies the part the template never had: a past the next run can actually use.

The short answer

Does a Kubernetes CronJob remember between runs? The template, the policy, and two timestamps persist, plus a short rolling window of finished Jobs, three successful and one failed by default. The work itself does not persist: every Job starts fresh, retries reset, logs expire with their Pods, and continuity exists only where an operator deliberately writes it. For stateless chores that is exactly right. For scheduled AI agents, whose value compounds when each run builds on the last, the memory has to be added as its own layer, and that layer is what Vilix AI provides.

Get Started for Free

Persistent memory across ChatGPT, Claude, and the AI tools you already use in Vilix AI.

Get Started for Free

Free forever, no credit card.

Keep reading
Does Azkaban Remember Between Runs? The History Is Kept. The Reasoning Is Not.

Does Azkaban Remember Between Runs? The History Is Kept. The Reasoning Is Not. Azkaban remembers that a flow ran, when it ran, whether it succeeded, and what it printed to its logs. It does not remember what the work inside the flow learned. Each new execution starts from the project files, the schedule, and whatever parameters are handed in at launch. If a step inside that flow is an AI agent, the agent wakes up with a job definition and no past: none of the findings, decisions, or open questi

Does Apache Ignite Remember Between Runs? The Grid Holds Data. The Agent Starts Empty.

Does Apache Ignite Remember Between Runs? The Grid Holds Data. The Agent Starts Empty. Apache Ignite remembers the data placed in its caches, and with one optional setting it remembers that data across a full cluster restart. Without that setting it remembers nothing once the cluster stops. Either way, what Ignite holds is current data under keys and in tables. It does not hold a run: what a scheduled AI agent checked, concluded, or promised to do next. An automation that wakes tomorrow can que

Does Hazelcast Remember Between Runs? The Map Holds Values. The Agent Starts Empty.

Does Hazelcast Remember Between Runs? The Map Holds Values. The Agent Starts Empty. Hazelcast remembers exactly what its data structures were told to hold, for exactly as long as the cluster, a backup, or an optional persistence layer keeps them alive. An IMap entry put by one process can be read by another process seconds or days later, as long as the cluster stays up or the entry was written through to an external store. What Hazelcast never holds is a run. It stores current values under keys