Sign inSign up

eaudeweb/cron

By eaudeweb

•Updated over 8 years ago

CRON container programmable via environment variables

Image
0

1.2K

eaudeweb/cron repository overview

⁠Docker container for CRON

This cron container receives jobs via the environment variables and scrips to be run can be mounted via volumes. Output is logged to the console

⁠Examples

To run any of the examples below, clone this repository locally and build a sample image:

$> git clone https://github.com/cristiroma/docker.cron.git
$> cd docker.cron
$> sudo su
#> docker build -t cronimage .

⁠Example 1 - Run echo every minute

docker run --rm -e "CRON_JOB_ECHO=* * * * * root echo 'Waking up ...' >> /var/log/cron.log 2>&1" --name sisyphus_container cronimage

After a couple of minutes, the console should look like this:

Installing job: CRON_JOB_ECHO in /etc/cron.d/CRON_JOB_ECHO
1 CRON jobs installed ...
Waking up ...
Waking up ...
Waking up ...
Waking up ...

Tag summary

Content type

Image

Digest

Size

38.6 MB

Last updated

over 8 years ago

docker pull eaudeweb/cron