Rancher's container-crontab acts as a crontab for other containers.
version: '3'
services:
crontab:
image: rancher/container-crontab:v0.5.0
container_name: crontab
volumes:
- /var/run/docker.sock:/var/run/docker.sock
By adding the label cron.schedule
to a docker-compose.yml file while starting the container, the crontab will start the respective container in the defined schedules or intervals.
labels:
cron.schedule: "0 0 1 * * MON"