Skip to content

amamut/docker-cron-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aptible/cron-example

Example implementation of cron jobs on Docker/Aptible

Installation and Usage

git clone https://github.com/aptible/docker-cron-example
cd docker-cron-example/
make run

The example will print "aptible/docker-cron-example" once every minute.

Including Within An App On Aptible

To include within an Aptible app, copy the three body lines of the Dockerfile to your own Dockerfile:

RUN apt-get -y install rsyslog
ADD files/etc/crontab /etc/crontab
RUN touch /var/log/cron.log

Then, copy files/etc/crontab to your own repo, replacing echo aptible/docker-cron-example with your own task, and * * * * * with your own desired job schedule.

Finally, add an entry in your Procfile for the new cron process:

cron: rsyslogd && cron && tail -f /var/log/syslog /var/log/cron.log

Copyright and License

MIT License, see LICENSE for details.

Copyright (c) 2014 Aptible and contributors.

@fancyremarker

About

Example implementation of cron jobs on Docker/Aptible

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Makefile 100.0%