From b1e16354437c9a96b8a701fae94a534ba8d6ee71 Mon Sep 17 00:00:00 2001 From: dpeca Date: Fri, 5 May 2017 15:07:44 +0200 Subject: [PATCH] Cron format validation fix -lt is 'lower than', so if you have wday=7 it will not be valid, which is wrong, because wday range is 0-7. Changed to -le which means 'lower or equal' --- func/main.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/func/main.sh b/func/main.sh index b9dc14c8..ad03f42a 100644 --- a/func/main.sh +++ b/func/main.sh @@ -737,7 +737,7 @@ is_cron_format_valid() { fi done fi - if [[ "$1" =~ ^[0-9]+$ ]] && [ "$1" -lt $limit ]; then + if [[ "$1" =~ ^[0-9]+$ ]] && [ "$1" -le $limit ]; then check_format='ok' fi if [ "$check_format" != 'ok' ]; then