Skip to content

Commit 2e03b51

Browse files
authored
Fix Min and hour limit in cron validation
1 parent 8a21735 commit 2e03b51

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

func/main.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,8 +723,12 @@ is_ip_status_format_valid() {
723723

724724
# Cron validator
725725
is_cron_format_valid() {
726-
limit=60
726+
limit=59
727727
check_format=''
728+
if [ "$2" = 'hour' ]; then
729+
limit=23
730+
fi
731+
728732
if [ "$2" = 'day' ]; then
729733
limit=31
730734
fi

0 commit comments

Comments
 (0)