https://github.com/ActiveState/dockron
Schedule your 'docker run's without having to install cron on the host
https://github.com/ActiveState/dockron
Last synced: about 1 year ago
JSON representation
Schedule your 'docker run's without having to install cron on the host
- Host: GitHub
- URL: https://github.com/ActiveState/dockron
- Owner: ActiveState
- License: mit
- Created: 2014-09-12T03:36:09.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2015-12-18T17:59:32.000Z (over 10 years ago)
- Last Synced: 2024-08-03T15:05:52.209Z (almost 2 years ago)
- Language: Go
- Homepage: https://registry.hub.docker.com/u/activestate/dockron/
- Size: 6.84 KB
- Stars: 29
- Watchers: 48
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
dockron
=======
dockron allows you to schedule your 'docker run's.
Example
-------
```
# Create a convenient alias:
$ alias dockron="docker run --rm \
-v $(which docker):/usr/bin/docker:ro \
-v /var/run/docker.sock:/var/run/docker.sock \
activestate/dockron"
# Invoke your favourite container periodically (here, every minute):
$ dockron "0 * * * *" docker run ubuntu /bin/bash -c "echo Hello world"
...
```
The first argument is the crontab-formatted repeat schedule. Rest of
the arguments should specify the entire 'docker run' command-line.
Logging
-------
The dockron container will log appropriately such that you may setup
log triggers to get notified if a command fails to run. This is
especially useful when you are managing containers using
[Papertrail](https://papertrailapp.com) and
[logspout](https://github.com/progrium/logspout), and as such demonstrates
the reason for using dockron instead of crontab on the docker host; the
scheduler is no different from that which it schedules, as all of them
are docker containers, and managed in the same way.