autodock-cron

command module
v0.0.0-...-df5c1da Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2021 License: MIT Imports: 12 Imported by: 0

README

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.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL