From 44b6b01d7889be8dbc4e909209cc06292739801b Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Sun, 21 Apr 2013 21:50:28 +0300 Subject: [PATCH] flixible cron time scheduler --- func/main.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/func/main.sh b/func/main.sh index 9b983df6b..ec99ec523 100644 --- a/func/main.sh +++ b/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