schedules
Reference for humanitec/schedules Workload Profile Feature
The schedules feature defines one or more schedules under which the workload should run as a Kubernetes CronJob.

Description

Kubernetes CronJobs must have exactly one Cron expression defined for them. This feature provides a convenience of creating sets of CronJobs with same basic configuration but running on different schedules. As an extra level of flexibility, the command and arguments for the container can optionally be overriden.
The top level is a Map of schedule objects. The Key must be a valid Humanitec ID. It is an error for the Map to be empty.
The schedule object has the following properties:
Property
Type
Description
schedule
String
containers
Object
A Map with keys of container IDs in the workload. The values are objects containing command and arg overrides.

Example

This example shows schedules for a CronJob with one container with the id main-container. The schedules are daily and every 6 hours. Each schedule runs a different command.
{
"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"
]
}
}
}
}
Copy link