Skip to main content
CronJobs create Jobs on a time-based schedule. They are useful for periodic tasks like backups, report generation, sending emails, and cleanup operations.

Key Concepts

CronJob

A resource that creates Jobs on a recurring schedule defined by cron syntax.

Schedule

Cron expression defining when Jobs should be created (e.g., 0 * * * * for hourly).

Job

A single execution instance created by the CronJob at each scheduled time.

Suspend

Temporarily stop scheduling new Jobs without deleting the CronJob.

Required Permissions

ActionPermission
View cronjobsiam:project:infrastructure:kubernetes:read
Run now (trigger)iam:project:infrastructure:kubernetes:write
Suspend/Resumeiam:project:infrastructure:kubernetes:write
Create cronjobiam:project:infrastructure:kubernetes:write
Edit cronjobiam:project:infrastructure:kubernetes:write
Delete cronjobiam:project:infrastructure:kubernetes:delete

CronJob Status Values

StatusDescription
ActiveCronJob is enabled and will create Jobs on schedule
SuspendedCronJob is paused and will not create new Jobs

Cron Schedule Format

CronJobs use standard cron syntax with five fields:
┌───────────── minute (0 - 59)
│ ┌───────────── hour (0 - 23)
│ │ ┌───────────── day of month (1 - 31)
│ │ │ ┌───────────── month (1 - 12)
│ │ │ │ ┌───────────── day of week (0 - 6) (Sunday = 0)
│ │ │ │ │
* * * * *
Common schedules:
ScheduleCron Expression
Every minute* * * * *
Every hour0 * * * *
Every day at midnight0 0 * * *
Every Monday at 9am0 9 * * 1
Every 15 minutes*/15 * * * *
Weekdays at 6am0 6 * * 1-5
Shorthand expressions:
ShorthandEquivalent
@hourly0 * * * *
@daily0 0 * * *
@weekly0 0 * * 0
@monthly0 0 1 * *
@yearly0 0 1 1 *

How to View CronJobs

1

Select Cluster

Choose a cluster from the cluster dropdown.
2

Select Namespace

Choose a namespace or select “all” to view CronJobs across all namespaces.
3

Filter and Search

Use the search box to find CronJobs by name or schedule, or filter by status.

How to View CronJob Details

1

Find the CronJob

Locate the CronJob in the list.
2

Click CronJob Name

Click on the CronJob name to open the detail drawer.
3

Review Details

View CronJob information including:
  • Schedule configuration
  • Last schedule time
  • Active Jobs count
  • Job template specification
  • Container details
  • Events

How to Run a CronJob Immediately

Trigger a CronJob to run now without waiting for the next scheduled time.
1

Find the CronJob

Locate the CronJob in the list.
2

Open Actions Menu

Click the actions menu (three dots) on the CronJob row.
3

Click Run Now

Select Run Now to trigger immediate execution.
4

Verify

A new Job is created with the name format: {cronjob-name}-manual-{timestamp}.
Manually triggered Jobs have the label triggered-by: manual to distinguish them from scheduled Jobs.

How to Suspend a CronJob

Suspend a CronJob to temporarily stop scheduling new Jobs.
1

Find the CronJob

Locate the active CronJob in the list.
2

Open Actions Menu

Click the actions menu on the CronJob row.
3

Click Suspend

Select Suspend from the menu.
4

Verify

The status changes to Suspended. No new Jobs will be scheduled.
Suspending a CronJob does not affect Jobs that are already running. They will continue to completion.

How to Resume a CronJob

Resume a suspended CronJob to restart scheduling.
1

Find the Suspended CronJob

Locate the suspended CronJob in the list.
2

Open Actions Menu

Click the actions menu on the CronJob row.
3

Click Resume

Select Resume from the menu.
4

Verify

The status changes to Active. Jobs will be scheduled according to the cron expression.

How to Create a CronJob

1

Click Create CronJob

Click the Create CronJob button in the page header.
2

Write YAML

Enter the CronJob manifest in YAML format. Key fields:
  • spec.schedule - Cron expression
  • spec.jobTemplate - Job template specification
  • spec.concurrencyPolicy - How to handle concurrent Jobs
3

Select Namespace

Choose the target namespace for the CronJob.
4

Create

Click Create to apply the manifest.

How to Edit a CronJob

1

Open Actions Menu

Click the actions menu on the CronJob row.
2

Click Edit YAML

Select Edit YAML to open the editor.
3

Modify Spec

Edit the CronJob specification. Common changes:
  • Schedule expression
  • Container image or command
  • Concurrency policy
  • History limits
4

Save

Click Update to apply changes.

How to Delete a CronJob

1

Open Actions Menu

Click the actions menu on the CronJob row.
2

Click Delete

Select Delete from the menu.
3

Confirm

Confirm the deletion.
Deleting a CronJob does not delete Jobs that have already been created. Running Jobs will continue to completion.

Concurrency Policies

Control what happens when a new Job is scheduled while a previous Job is still running:
PolicyDescription
AllowAllow concurrent Jobs (default)
ForbidSkip new Job if previous is still running
ReplaceCancel running Job and start new one

History Limits

CronJobs track completed and failed Jobs for review:
SettingDescriptionDefault
successfulJobsHistoryLimitNumber of successful Jobs to keep3
failedJobsHistoryLimitNumber of failed Jobs to keep1
Set higher history limits for debugging or lower limits to reduce resource usage.

Troubleshooting

  • Check if CronJob is suspended
  • Verify schedule syntax is correct
  • Check concurrency policy - previous Job may still be running
  • Review CronJob events for errors
  • Verify time zone considerations
  • Check container image exists and is accessible
  • Verify command and arguments are correct
  • Check required ConfigMaps/Secrets exist
  • Review Job pod logs for error messages
  • If more than 100 schedules are missed, CronJob stops
  • Check startingDeadlineSeconds setting
  • Verify cluster has available resources
  • Review CronJob events
  • Set activeDeadlineSeconds on Job template to limit runtime
  • Consider using Forbid concurrency policy
  • Check for resource constraints slowing execution
  • Reduce successfulJobsHistoryLimit and failedJobsHistoryLimit
  • Jobs beyond limits are automatically cleaned up
  • Manually delete old Jobs if needed
  • Verify you have write permission
  • Check cluster connectivity
  • Review Job creation errors in events

FAQ

CronJobs use the kube-controller-manager’s time zone by default, which is typically UTC. Kubernetes 1.27+ supports the timeZone field to specify a different zone.
Yes. Use the Run Now action to trigger immediate execution. The created Job will have triggered-by: manual label.
Running Jobs continue to completion. Only future scheduled Jobs are prevented. Delete Jobs separately if needed.
View the logs of pods created by the Job. Navigate to Jobs page, find the Job, and view pod logs.
Yes. Edit the CronJob YAML and update the spec.schedule field. Changes apply to future schedules.
Forbid skips the new Job entirely if one is running. Replace cancels the running Job and starts a new one. Use Forbid for jobs that must complete; use Replace for jobs where only the latest run matters.
Set spec.jobTemplate.spec.activeDeadlineSeconds to limit Job runtime. The Job will be terminated if it exceeds this duration.
CronJobs don’t retry failed Jobs. Use Job’s backoffLimit to retry within a single Job, or let the next scheduled run attempt the task.