Skip to content

Commit b4f1b73

Browse files
authored
Allow ranges in hours and minutes
Ranges of hours and minutes should be allowed on their own. The regex change should allow that. eg `2-23` or `34-45`
1 parent c7ce2b7 commit b4f1b73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CronLint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ function ($v) {
149149
list($mins, $hours, $dayofmonth, $month, $dayofweek) = array_slice($args, 0, 5);
150150

151151
$regEx = [
152-
'minhour' => '/^([\*|\d]+)$|^([\*]\/\d+)$|^([\d+]\/\d+?(\-\d+))$|^(\d+-\d+\/[\d]+)$/i',
152+
'minhour' => '/^([\*|\d])$|^([\*|\d]+?(\-\d+))$|^([\*]\/\d+)$|^([\d+]\/\d+?(\-\d+))$|^(\d+-\d+\/[\d]+)$/i',
153153
'daymonth' => '/^(\d|\*)$/i',
154154
'month' => '/^(\d|\*)$/i',
155155
'dayweek' => '/^(\*|\d|[a-z]{3})$/i',

0 commit comments

Comments
 (0)