Skip to content

Commit b1e1635

Browse files
authored
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'
1 parent b57c4dc commit b1e1635

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

func/main.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ is_cron_format_valid() {
737737
fi
738738
done
739739
fi
740-
if [[ "$1" =~ ^[0-9]+$ ]] && [ "$1" -lt $limit ]; then
740+
if [[ "$1" =~ ^[0-9]+$ ]] && [ "$1" -le $limit ]; then
741741
check_format='ok'
742742
fi
743743
if [ "$check_format" != 'ok' ]; then

0 commit comments

Comments
 (0)