Cron Plugin for autodock
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
James Mills b336fc92a8
Remove Github workflows
12 months ago
.dockerignore Initial port to Golang based on autodock-logger reference 4 years ago
.gitignore Initial port to Golang based on autodock-logger reference 4 years ago
.yamllint.yml Migrate to Github Actions Workflows (#3) 2 years ago
Dockerfile Simplified build and updated go use GoModules 3 years ago
LICENSE Initial port to Golang based on autodock-logger reference 4 years ago
Makefile Simplified build and updated go use GoModules 3 years ago
README.md Fix import paths 12 months ago
go.mod Fix import paths 12 months ago
go.sum Fix import paths 12 months ago
main.go Fix import paths 12 months ago

README.md

autodock-cron

Build Status

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.