⎈ 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 · doc — “CronJob”

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` Create — describes conf=1
part_of `patch` Patch — describes conf=1
part_of `put` Replace — describes conf=1
part_of `delete` Delete — describes conf=1
part_of `delete` Delete Collection — describes conf=1
part_of `get` Read — describes conf=1
part_of `get` List — describes conf=1
part_of `get` List All Namespaces — describes conf=1
part_of `get` Watch — describes conf=1
part_of `get` Watch List — describes conf=1
part_of `get` Watch List All Namespaces — describes conf=1
part_of `patch` Patch Status — describes conf=1
part_of `get` Read Status — describes conf=1
part_of `put` Replace Status — describes conf=1
api_for CronJob — documents API object conf=1

← all Docs