Overview

A CronJob creates Jobs on a repeating schedule. It is useful for creating periodic and recurring tasks, such as running backups or sending emails at a specific time.

Key Concepts

  • Schedule: Defined using the standard cron format (e.g., 0 * * * * for every hour).
  • Concurrency Policy: Defines what happens if a new Job is scheduled while a previous one is still running (Allow, Forbid, or Replace).
  • History Limit: Controls how many successful and failed Jobs are kept for auditing purposes.

Use Cases

  • Nightly database backups.
  • Generating weekly reports.
  • Periodic cleanup of temporary files.

Related Terms