Skip to content

Commit a7eadc0

Browse files
fixed cron validation
1 parent 0e9526e commit a7eadc0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

func/main.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,10 +727,11 @@ is_cron_format_valid() {
727727
check_format='ok'
728728
fi
729729
fi
730-
if [[ "$1" =~ ^[0-9][-|,|0-9]{0,28}[0-9]$ ]]; then
730+
if [[ "$1" =~ ^[0-9][-|,|0-9]{0,70}[\/][0-9]$ ]]; then
731731
check_format='ok'
732732
crn_values=${1//,/ }
733733
crn_values=${crn_values//-/ }
734+
crn_values=${crn_values//\// }
734735
for crn_vl in $crn_values; do
735736
if [ "$crn_vl" -gt $limit ]; then
736737
check_format='invalid'

0 commit comments

Comments
 (0)