Docker image that can be used to run cron jobs using environment variables.
2.5K
Docker image for running cron jobs.
Synchronize files example project https://github.com/arcane-io/docker-cron .
In order to create cron jobs add environment properties that start with 'CRON_' (the name must be unique) and have the value with the format <cron-value> <command>.
The cron commands output can be found in '/var/log/cron.log' .
docker run --rm -e CRON_SAMPLE="* * * * * echo 1 minute cron" tinslice/crontab
version: '3.7'
services:
cron:
image: tinslice/crontab
container_name: crontab
environment:
CRON_SAMPLE: '* * * * * echo 1 minute cron'
CRON_ANOTHER_SAMPLE: '*/5 * * * * echo 5 minute cron'
CRON_ERROR_SAMPLE: '*/3 * * * * no-valid-command'
Check logs
docker logs -f crontab
Content type
Image
Digest
Size
21 MB
Last updated
over 6 years ago
docker pull tinslice/crontab