-
Notifications
You must be signed in to change notification settings - Fork 1
CronJob
Gregory Nickonov edited this page Mar 1, 2019
·
3 revisions
Normally, the CronJob declaration looks like that:
R.cron_job 'logs-cleaner' do
# Run midnight UTC every single day
schedule '0 0 * * *'
# You have to specify restart policy!
pod_template_spec.restart_policy :OnFailure
container do
# Setup main container
end
end| Sunstone property | Kubernetes property | Type |
|---|---|---|
| spec | spec | CronJobSpec |
A shortcut to spec.schedule, used to specify a run schedule in the Cron format.
| Sunstone property | Kubernetes property | Type |
|---|---|---|
| concurrency_policy | concurrencyPolicy | String |
| failed_jobs_history_limit | failedJobsHistoryLimit | Integer |
| job_template | jobTemplate | JobTemplateSpec |
| schedule | schedule | String |
| successful_jobs_history_limit | successfulJobsHistoryLimit | Integer |
| suspend | suspend | Boolean |
| Sunstone property | Kubernetes property | Type |
|---|---|---|
| metadata | metadata | Kubernetes Object Metadata |
| spec | spec | JobSpec |
| Sunstone property | Kubernetes property | Type |
|---|---|---|
| active_deadline_seconds | activeDeadlineSeconds | Integer |
| backoff_limit | backoffLimit | Integer |
| completions | completions | Integer |
| manual_selector | manualSelector | Boolean |
| parallelism | parallelism | Integer |
| selector | selector | LabelSelector |
| template | template | PodTemplateSpec |
| ttl_seconds_after_finished | ttlSecondsAfterFinished | Integer |