mirror of
https://github.com/willfarrell/docker-crontab.git
synced 2025-04-04 14:05:11 +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
|
||||
- `name`: Human readable name that will be used as teh job filename. 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.
|
||||
- `image`: Docker images name (ex `library/alpine:3.5`). Optional.
|
||||
- `project`: Docker Compose/Swarm project name. Optional, only applies when `contain` is included.
|
||||
@ -98,4 +98,4 @@ grok: `CRONTABLOG %{DATA:request_id} %{TIMESTAMP_ISO8601:timestamp} \[%{LOGLEVEL
|
||||
- [ ] Have ability to auto regenerate crontab on file change (signal HUP?)
|
||||
- [ ] Run commands on host machine (w/ --privileged?)
|
||||
- [ ] Write tests
|
||||
- [ ] Setup TravisCI
|
||||
- [ ] Setup TravisCI
|
||||
|
@ -81,25 +81,25 @@ make_cmd() {
|
||||
parse_schedule() {
|
||||
case $1 in
|
||||
"@yearly")
|
||||
echo "0 0 0 1 1 *"
|
||||
echo "0 0 1 1 *"
|
||||
;;
|
||||
"@annually")
|
||||
echo "0 0 0 1 1 *"
|
||||
echo "0 0 1 1 *"
|
||||
;;
|
||||
"@monthly")
|
||||
echo "0 0 0 1 * *"
|
||||
echo "0 0 1 * *"
|
||||
;;
|
||||
"@weekly")
|
||||
echo "0 0 0 * * 0"
|
||||
echo "0 0 * * 0"
|
||||
;;
|
||||
"@daily")
|
||||
echo "0 0 0 * * *"
|
||||
echo "0 0 * * *"
|
||||
;;
|
||||
"@midnight")
|
||||
echo "0 0 0 * * *"
|
||||
echo "0 0 * * *"
|
||||
;;
|
||||
"@hourly")
|
||||
echo "0 0 * * * *"
|
||||
echo "0 * * * *"
|
||||
;;
|
||||
"@every")
|
||||
TIME=$2
|
||||
@ -119,7 +119,7 @@ parse_schedule() {
|
||||
TOTAL=$(($TOTAL + ${D::-1} * 60 * 24))
|
||||
fi
|
||||
|
||||
echo "*/${TOTAL} * * * * *"
|
||||
echo "*/${TOTAL} * * * *"
|
||||
;;
|
||||
*)
|
||||
echo "${@}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user