CronJobs

A CronJob is an object that runs periodic tasks inside a Kubernetes cluster. A CronJob typically uses a cron schedule to define how often a task runs (for example, every day at 5:00 AM) and which command to execute.

On the CronJobs tab you can create, delete, and view scheduled jobs.

Creating a CronJob

To create a CronJob, click + Add CronJob.

Fill in:

  • Description.
  • CronJob specification.
  • Job template (Template Job).
  • Container details. For Init containers, Containers, and Pod template settings, see Pods.

Click Save.

You can delete a CronJob from the namespace in one of the following ways:

  • On the CronJobs page, click in the object row.
  • On the CronJob view page, on the CronJob tab, click Delete.
  • On the CronJob view page, open the Manifest tab and click .

When deleting, you can choose:

  • Delete completely
  • Delete and recreate

If you choose Delete and recreate, the CronJob is deleted and a CronJob creation dialog opens with fields prefilled from the deleted CronJob.

Viewing a CronJob

Screenshot

cronjob

The page has tabs:

  • CronJob
  • Pods (shows a count)
  • Jobs (shows a count)
  • Job template (includes the pod template)
  • Labels and annotations (list of labels and annotations)
  • Events (shows a count)
  • Security
  • Manifest

CronJob tab

Shows CronJob details. The CronJob specification block includes:

  • Schedule*
  • concurrencyPolicy
  • startingDeadlineSeconds
  • successfulJobsHistoryLimit
  • failedJobsHistoryLimit
  • Paused / Not paused toggle

The Pod selector block shows matching pod labels. Note! Label selectors use logical AND. The selected object must have all specified labels.

The Monitoring metrics block shows CPU Usage and Memory Usage for the CronJob over the past hour.

Pods tab

Screenshot

cronjobpod2

Lists pods owned by the CronJob with details:

  • Pod name (filterable).
  • Ratio of running containers to total containers in the pod.
  • Pod restart count (sortable).
  • Creation date (sortable).
  • Namespace (filterable). Clicking the namespace name opens the namespace dashboard. Enter a value to filter pods by namespace. To clear namespace filtering, click Cancel in the filter, then Apply.
  • Status (filterable). Filter values: Running, Pending, Terminating, CrashLoopBackOff, Completed, Failed, Unknown.
  • Parent object (filterable). When the pod belongs to a workload, clicking the workload name opens its view page.
  • Node where the pod runs (filterable). Clicking the node opens the node view page if you have access.
  • Pod QoS (Quality of Service) (filterable: Guaranteed, Burstable, BestEffort). For more about QoS, see Pods.
  • Pod labels (the Labels column is hidden by default). To show pod labels, click the gear icon in the table corner and enable the Labels column.

Click a pod row to open the pod view page.

Jobs tab

Screenshot

cronjobjob

Lists Jobs created by the CronJob with details:

  • when the Job was created;
  • status (color indicator);
  • Job image details.

Pod template tab

Screenshot

cronjobtp

Shows the pod template, containers, init containers, and volumes for the CronJob.

Security tab

Screenshot

cronjobsecure1

The Security tab shows:

  • Image vulnerability scan results for objects in this CronJob (shown only if the Container Image Scanning module is installed in the cluster).
  • Security policy compliance analysis results for objects in this CronJob (shown only if the Application Configuration Analysis module is installed in the cluster).

Events tab

Screenshot

cronjobevent

The Events tab shows CronJob events:

  • event type indicator;
  • date and time;
  • event source;
  • event message text.

Manifest tab

Screenshot

cronjobmanifest1

The Manifest tab shows the CronJob manifest for viewing and copying. You can also delete the CronJob. If the CronJob has at least one privileged container, that is indicated on the tab.