From 61ef1db4bf9b70846d56cdd56362776b6318f88f Mon Sep 17 00:00:00 2001 From: will Farrell Date: Mon, 23 Oct 2017 09:45:24 -0600 Subject: [PATCH] Change documentation showing seconds in cron schedule in error --- README.md | 4 ++-- docker-entrypoint | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 5b0d223..9ffb018 100644 --- a/README.md +++ b/README.md @@ -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 \ No newline at end of file +- [ ] Setup TravisCI diff --git a/docker-entrypoint b/docker-entrypoint index 957170e..440b3d3 100755 --- a/docker-entrypoint +++ b/docker-entrypoint @@ -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 "${@}"