Skip to content

Commit

Permalink
Fix canRun method (more strict rule)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stevad authored Jul 13, 2016
1 parent 5919277 commit c3885c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CronTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ public function canRun()
$canRun[$field] = in_array($value, $this->_allowedValues[$field], true);
}

return $canRun['minute'] && $canRun['hour'] && $canRun['month'] && ($canRun['day'] || $canRun['dayOfWeek']);
return $canRun['minute'] && $canRun['hour'] && $canRun['month'] && $canRun['day'] && $canRun['dayOfWeek'];
}

/**
Expand Down Expand Up @@ -602,4 +602,4 @@ private function generateSequence($field, $start, $end, $step)

return $values;
}
}
}

0 comments on commit c3885c8

Please sign in to comment.