Change documentation showing seconds in cron schedule in error

This commit is contained in:
will Farrell 2017-10-23 09:45:24 -06:00
parent d83f0b3a1b
commit 61ef1db4bf
2 changed files with 10 additions and 10 deletions

View File

@ -24,7 +24,7 @@ A great project, don't get me wrong. It was just missing certain key enterprise
## Config.json ## Config.json
- `name`: Human readable name that will be used as teh job filename. Optional. - `name`: Human readable name that will be used as teh job filename. Optional.
- `comment`: Comments to be included with crontab entry. Optional. - `comment`: Comments to be included with crontab entry. Optional.
- `schedule`: Crontab schedule syntax as described in https://godoc.org/github.com/robfig/cron. Ex `@hourly`, `@every 1h30m`, `* * * * * *`. Required. - `schedule`: Crontab schedule syntax as described in https://en.wikipedia.org/wiki/Cron. Ex `@hourly`, `@every 1h30m`, `* * * * *`. Required.
- `command`: Command to be run on in crontab container or docker container/image. Required. - `command`: Command to be run on in crontab container or docker container/image. Required.
- `image`: Docker images name (ex `library/alpine:3.5`). Optional. - `image`: Docker images name (ex `library/alpine:3.5`). Optional.
- `project`: Docker Compose/Swarm project name. Optional, only applies when `contain` is included. - `project`: Docker Compose/Swarm project name. Optional, only applies when `contain` is included.

View File

@ -81,25 +81,25 @@ make_cmd() {
parse_schedule() { parse_schedule() {
case $1 in case $1 in
"@yearly") "@yearly")
echo "0 0 0 1 1 *" echo "0 0 1 1 *"
;; ;;
"@annually") "@annually")
echo "0 0 0 1 1 *" echo "0 0 1 1 *"
;; ;;
"@monthly") "@monthly")
echo "0 0 0 1 * *" echo "0 0 1 * *"
;; ;;
"@weekly") "@weekly")
echo "0 0 0 * * 0" echo "0 0 * * 0"
;; ;;
"@daily") "@daily")
echo "0 0 0 * * *" echo "0 0 * * *"
;; ;;
"@midnight") "@midnight")
echo "0 0 0 * * *" echo "0 0 * * *"
;; ;;
"@hourly") "@hourly")
echo "0 0 * * * *" echo "0 * * * *"
;; ;;
"@every") "@every")
TIME=$2 TIME=$2
@ -119,7 +119,7 @@ parse_schedule() {
TOTAL=$(($TOTAL + ${D::-1} * 60 * 24)) TOTAL=$(($TOTAL + ${D::-1} * 60 * 24))
fi fi
echo "*/${TOTAL} * * * * *" echo "*/${TOTAL} * * * *"
;; ;;
*) *)
echo "${@}" echo "${@}"