autodock-cron
![Build Status](https://cloud.drone.io/api/badges/prologic/autodock-cron/status.svg)
Cron plugin for autodock. autodock-cron is a cron-like plugin for autodock
which watches for container
and service
startup events and reschedules
those containers and services according to their configured schedule. The
schedule is configured by container or service labels of the form:
💡 See autodock for more info.
Building
From source:
$ go build .
Using Docker:
$ docker build -t autodock-cron .
Usage
From source:
$ ./autodock-cron -h <autodock_host>
Using Docker:
$ docker run -d autodock-cron -H <autodock_host>
autodock-cron
then looks for containers started with a label of
autodock.cron=<schedule>
where schedule is a valid Cron-like
expression of the form:
<seconds> <minutes> <hour> <dom> <month> <dow>
@yearly
(or @annually
)
@monthly
@weekly
@daily
(or @midnight
)
@hourly
@every <duration>
where <duration>
is a string accepted by
time.ParseDuration for example
@every 5m
or @every 20m30s
.
The following is a sample docker-compose.yml
snippet:
deploy:
labels:
- "autodock.cron=@every 5m"
License
autodock-cron is MIT licensed.