mirror of
https://github.com/willfarrell/docker-crontab.git
synced 2025-04-15 10:49:57 +02:00
Change documentation showing seconds in cron schedule in error
This commit is contained in:
parent
d83f0b3a1b
commit
61ef1db4bf
@ -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.
|
||||||
|
@ -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 "${@}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user