HUB
Sign inSign up

gaafar/cron

By gaafar

•Updated about 10 years ago

simple container to run cron jobs

Image
1

2.8K

gaafar/cron repository overview

⁠docker-cron

simple container to run cron jobs

⁠running

docker run -v "/path/to/cron:/etc/cron.d/crontab" gaafar/cron

/path/to/cron: absolute path to crontab file

⁠use as base in a Dockerfile

FROM gaafar/cron

# COPY crontab file in the cron directory
COPY crontab /etc/cron.d/crontab

# Add your commands here

⁠crontab example

* * * * * root  echo "hello" >> /var/log/cron.log 2>&1
# An empty line is required at the end a cron file.

⁠Notes

  • Environment variables won't be available for the cron script by default. Google docker cron environment for some workarounds.
Tag summary
Recent tags
Content type
Image
Digest
Size
75.4 MB
Last updated
about 10 years ago
docker pull gaafar/cron:latest