Editing Kubernetes CronJobs

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
Kubernetes <code>CronJob</code>s (previously <code>ScheduledJobs</code>) GA since [[Kubernetes 1.21]] (April 2021) and Beta since [[Kubernetes 1.8]].
+
<code>CronJob</code>s (previously ScheduledJobs) has been a beta feature since Kubernetes 1.8! With 1.21 we get to finally see this widely used API graduate to stable.
* https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/
+
 
 +
CronJobs are meant for performing regular scheduled actions such as backups, report generation, and so on. Each of those tasks should be configured to recur indefinitely (for example: once a day / week / month); you can define the point in time within that interval when the job should start.
  
CronJobs are meant for performing regular scheduled actions such as [[backups]], [[report generation]], and so on. Each of those tasks should be configured to recur indefinitely (for example: once a day / week / month); you can define the point in time within that interval when the job should start.
 
  
== Example ==
 
 
https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/
 
https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/
 
  [[apiVersion:]] batch/v1
 
  [[apiVersion:]] batch/v1
  [[kind: CronJob]]
+
  [[kind:]] CronJob
  [[metadata:]]
+
  metadata:
 
   name: hello
 
   name: hello
 
  spec:
 
  spec:
 
   schedule: "*/1 * * * *"
 
   schedule: "*/1 * * * *"
   [[jobTemplate:]]
+
   jobTemplate:
     [[spec:]]
+
     spec:
 
       template:
 
       template:
 
         spec:
 
         spec:
 
           containers:
 
           containers:
 
           - name: hello
 
           - name: hello
             [[image]]: [[busybox]]
+
             image: [[busybox]]
 
             imagePullPolicy: IfNotPresent
 
             imagePullPolicy: IfNotPresent
 
             command:
 
             command:
Line 25: Line 24:
 
             - date; echo Hello from the Kubernetes cluster
 
             - date; echo Hello from the Kubernetes cluster
 
           restartPolicy: OnFailure
 
           restartPolicy: OnFailure
 +
  
 
== Related ==
 
== Related ==
* <code>[[kind: Job]]</code>, <code>[[kubectl get jobs]]</code>
+
* <code>[[Job]]</code>: <code>[[kind: Job]]</code>
* <code>[[kind: CronJob]]</code>, <code>[[kubectl get cronjob]]</code>
 
 
* [[Jobs (Kubernetes)]]
 
* [[Jobs (Kubernetes)]]
* [[Kubernetes scheduling]]
 
* [[Cronitor]]
 
  
 
== See also ==
 
== See also ==

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Advertising: