Skip to content

Commit bc82fca

Browse files
authored
Merge pull request hestiacp#1453 from Skamasle/patch-19
Fix Min and hour limit in cron validation
2 parents add956b + 2e03b51 commit bc82fca

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)