84 if ($loopCount > 2880) {
85 throw new \RuntimeException(
'Unable to determine next execution timestamp: Hour and minute combination is invalid.', 1291494126);
98 if ($loopCount > 1464) {
99 throw new \RuntimeException(
'Unable to determine next execution timestamp: Day of month, month and day of week combination is invalid.', 1291501280);
106 $this->timestamp = $newTimestamp;
138 $commandMatch = FALSE;
140 $commandMatch = TRUE;
142 return $commandMatch;
156 $isInDayOfMonth = $this->
isInCommandList($this->cronCommandSections[2], $dayOfMonth);
157 $isInMonth = $this->
isInCommandList($this->cronCommandSections[3], $month);
158 $isInDayOfWeek = $this->
isInCommandList($this->cronCommandSections[4], $dayOfWeek);
164 $isDayOfMonthRestricted = (string)$this->cronCommandSections[2] !==
'*';
165 $isDayOfWeekRestricted = (string)$this->cronCommandSections[4] !==
'*';
166 $commandMatch = FALSE;
168 if ($isInDayOfMonth && $isDayOfMonthRestricted || $isInDayOfWeek && $isDayOfWeekRestricted || $isInDayOfMonth && !$isDayOfMonthRestricted && $isInDayOfWeek && !$isDayOfWeekRestricted) {
169 $commandMatch = TRUE;
172 return $commandMatch;
185 if ((
string) $commandExpression ===
'*') {
208 $nextDay = $now + 60 * 60 * 25;
209 $nextDay = mktime(0, 0, 0, date(
'n', $nextDay), date(
'j', $nextDay), date(
'Y', $nextDay));
210 return $nextDay - $now;
220 return mktime(date(
'H',
$timestamp), date(
'i',
$timestamp), 0, date(
'n',
$timestamp), date(
'j',
$timestamp), date(
'Y',
$timestamp));
minuteAndHourMatchesCronCommand($timestamp)
roundTimestamp($timestamp)
isInCommandList($commandExpression, $numberToMatch)
numberOfSecondsInDay($timestamp)
static trimExplode($delim, $string, $removeEmptyValues=FALSE, $limit=0)
static normalize($cronCommand)
dayMatchesCronCommand($timestamp)
__construct($cronCommand, $timestamp=FALSE)
static inList($list, $item)