Sign inSign up

hamiltont/docker-cron

By hamiltont

Updated about 10 years ago

Run Cron jobs inside Docker container

Image
20

10K+

hamiltont/docker-cron repository overview

Docker-Cron

Use Cron inside Docker. Looks for crontab at /cron/crontab

Note: Does not use actual cron binary, as there are issues running it inside Docker. Uses devcron instead.

Use

This example mounts the folder containing your crontab file. Presumably you would put your scripts in the same file and reference them in your crontab as /cron/myscript.sh

$ docker run -v /host/folder/containing/crontab:/cron -d hamiltont/docker-cron

This example mounts two folders, one with the crontab and one with the scripts. You need to use /scripts/myscript.sh in your crontab

$ docker run -v /host/folder/containing/crontab:/cron -v /host/folder/scripts:/scripts -d hamiltont/docker-cron

Tag summary

Content type

Image

Digest

sha256:bf063a811

Size

69.4 MB

Last updated

about 10 years ago

docker pull hamiltont/docker-cron