Przeglądaj źródła

flixible cron time scheduler

Serghey Rodin 13 lat temu
rodzic
commit
44b6b01d78
1 zmienionych plików z 10 dodań i 0 usunięć
  1. 10 0
      func/main.sh

+ 10 - 0
func/main.sh

@@ -664,6 +664,16 @@ validate_format_mhdmw() {
             check_format='ok'
         fi
     fi
+    if [[ "$1" =~ ^[0-9][-|,|0-9]{0,28}[0-9]$ ]]; then
+        check_format='ok'
+        crn_values=${1//,/ }
+        crn_values=${crn_values//-/ }
+        for crn_vl in $crn_values; do
+            if [ "$crn_vl" -gt $limit ]; then
+                check_format='invalid'
+            fi
+        done
+    fi
     if [[ "$1" =~ ^[0-9]+$ ]] && [ "$1" -lt $limit ]; then
         check_format='ok'
     fi