2 namespace TYPO3\CMS\Scheduler\CronCommand;
58 $this->cronCommandSections = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(
' ', $cronCommand);
85 if ($loopCount > 2880) {
86 throw new \RuntimeException(
'Unable to determine next execution timestamp: Hour and minute combination is invalid.', 1291494126);
99 if ($loopCount > 1464) {
100 throw new \RuntimeException(
'Unable to determine next execution timestamp: Day of month, month and day of week combination is invalid.', 1291501280);
107 $this->timestamp = $newTimestamp;
142 $commandMatch =
false;
144 $commandMatch =
true;
146 return $commandMatch;
161 $isInDayOfMonth = $this->
isInCommandList($this->cronCommandSections[2], $dayOfMonth);
162 $isInMonth = $this->
isInCommandList($this->cronCommandSections[3], $month);
163 $isInDayOfWeek = $this->
isInCommandList($this->cronCommandSections[4], $dayOfWeek);
169 $isDayOfMonthRestricted = (string)$this->cronCommandSections[2] !==
'*';
170 $isDayOfWeekRestricted = (string)$this->cronCommandSections[4] !==
'*';
171 $commandMatch =
false;
173 if ($isInDayOfMonth && $isDayOfMonthRestricted || $isInDayOfWeek && $isDayOfWeekRestricted || $isInDayOfMonth && !$isDayOfMonthRestricted && $isInDayOfWeek && !$isDayOfWeekRestricted) {
174 $commandMatch =
true;
177 return $commandMatch;
191 if ((
string)$commandExpression ===
'*') {
194 $inList = \TYPO3\CMS\Core\Utility\GeneralUtility::inList($commandExpression, $numberToMatch);
215 $nextDay = $now + 60 * 60 * 25;
216 $nextDay = mktime(0, 0, 0, date(
'n', $nextDay), date(
'j', $nextDay), date(
'Y', $nextDay));
217 return $nextDay - $now;
228 return mktime(date(
'H',
$timestamp), date(
'i',
$timestamp), 0, date(
'n',
$timestamp), date(
'j',
$timestamp), date(
'Y',
$timestamp));