Links

default-cronjob

Reference for humanitec/default-cronjob Workload Profile
This Workload Profile generates a series of Kubernetes CronJobs. The Workload Profile allows multiple schedules to be defined in one workload.

Features

Feature
Description
Specify Annotations that will be added to Pods generated for the workload.
Add one or more containers to the workload.
labels
Specify Labels that will be added to Pods generated for the workload.
Specify the Service Account pods should run under.
schedules
Specify a series of schedules and container overrides for CronJobs.

Example

{
"containers": {
"my-container": {
"id": "sample-service",
"image": "registry.humanitec.io/public/sample-service:1.2.0",
"resources": {
"limits": {
"cpu": "0.250",
"memory": "256Mi"
},
"requests": {
"cpu": "0.025",
"memory": "64Mi"
}
},
"variables": {
"MY_ENV_VAR": "Hello World!"
}
}
},
"labels": {
"prometheus-name": "my-cronjob"
},
"schedules": {
"daily-run": {
"schedule": "0 23 * * *",
"containers": {
"main-container": {
"command": [
"node",
"daily-cron.js"
]
}
}
},
"6-hour-run": {
"schedule": "15 1,7,13,19 * * *",
"containers": {
"main-container": {
"args": [
"--hours",
"6"
]
}
}
}
},
"serviceAccountName": "my-service-account"
}