Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

jeboehm/docker-cron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jeboehm/cron

Build Status

jeboehm/cron is able to start your existing Docker containers periodically. It uses docker-gen to create the crontab and reads the container's CRON_STARTTIME environment variable.

Usage

Start jeboehm/cron by using the shell script under bin/crond. Change it according to your needs.

You can look into your current crontab by running bin/crontab -l.

Example

$ docker run --name date -e CRON_STARTTIME="* * * * *" busybox date
$ docker logs date

This will start the container named 'date' every minute. After a few minutes you should see the minutes passing by reading the logs.

$ docker run --name backup -e CRON_STARTTIME="00 13 * * *|00 18 * * *" busybox yourbackupscript.sh

This fictive example will start your backup container at 1 and 6 pm.

About

Small cron daemon to launch other docker containers periodically

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published