⎈ k8s knowledge compiler

CronJob [page]deterministic

CronJob represents the configuration of a single cron job.

reference

`apiVersion: batch/v1`

`import "k8s.io/api/batch/v1"`

## CronJob {#CronJob}

CronJob represents the configuration of a single cron job.

<hr>

<table> <thead><tr><th>Field</th><th>Description</th></tr></thead> <tbody> <tr> <td><code>apiVersion</code><br/><em>string</em></td> <td>APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources</td> </tr> <tr> <td><code>kind</code><br/><em>string</em></td> <td>Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds</td> </tr> <tr> <td><code>metadata</code><br/><em><a href="">ObjectMeta</a></em></td> <td>Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata</td> </tr> <tr> <td><code>spec</code>&nbsp;<strong>*</strong><br/><em><a href="">CronJobSpec</a></em></td> <td>Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status</td> </tr> <tr> <td><code>status</code><br/><em><a href="">CronJobStatus</a></em></td> <td>Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status</td> </tr> </tbody> </table>

## CronJobSpec {#CronJobSpec}

CronJobSpec describes how the job execution will look like and when it will actually run.

<hr>

<table> <thead><tr><th>Field</th><th>Description</th></tr></thead> <tbody> <tr> <td><code>concurrencyPolicy</code><br/><em>string</em></td> <td>Specifies how to treat concurrent executions of a Job. Valid values are: - "Allow" (default): allows CronJobs to run concurrently; - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - "Replace": cancels currently running job and replaces it with a new one<br/><br/>Possible enum values:<br/> - `"Allow"` allows CronJobs to run concurrently.<br/> - `"Forbid"` forbids concurrent runs, skipping next run if previous hasn't finished yet.<br/> - `"Replace"` cancels currently running job and replaces it with a new one.</td> </tr> <tr> <td><code>failedJobsHistoryLimit</code><br/><em>integer</em></td> <td>The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1.</td> </tr> <tr> <td><code>jobTemplate</code>&nbsp;<strong>*</strong><br/><em><a href="">JobTemplateSpec</a></em></td> <td>Specifies the job that will be created when executing a CronJob.</td> </tr> <tr> <td><code>schedule</code>&nbsp;<strong>*</strong><br/><em>string</em></td> <td>The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.</td> </tr> <tr> <td><code>startingDeadlineSeconds</code><br/><em>integer</em></td> <td>Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.</td> </tr> <tr> <td><code>successfulJobsHistoryLimit</code><br/><em>integer</em></td> <td>The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3.</td> </tr> <tr> <td><code>suspend</code><br/><em>boolean</em></td> <td>This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.</td> </tr> <tr> <td><code> …(trimmed)

Sources

reference/kubernetes-api/batch/cron-job-v1.md · docCronJob

Related (21)

part_of CronJob {#CronJob}describes conf=1
part_of CronJobSpec {#CronJobSpec}describes conf=1
part_of CronJobStatus {#CronJobStatus}describes conf=1
part_of CronJobList {#CronJobList}describes conf=1
part_of JobTemplateSpec {#JobTemplateSpec}describes conf=1
part_of Operations {#Operations}describes conf=1
part_of `post` Createdescribes conf=1
part_of `patch` Patchdescribes conf=1
part_of `put` Replacedescribes conf=1
part_of `delete` Deletedescribes conf=1
part_of `delete` Delete Collectiondescribes conf=1
part_of `get` Readdescribes conf=1
part_of `get` Listdescribes conf=1
part_of `get` List All Namespacesdescribes conf=1
part_of `get` Watchdescribes conf=1
part_of `get` Watch Listdescribes conf=1
part_of `get` Watch List All Namespacesdescribes conf=1
part_of `patch` Patch Statusdescribes conf=1
part_of `get` Read Statusdescribes conf=1
part_of `put` Replace Statusdescribes conf=1
api_for CronJobdocuments API object conf=1

← all Docs