Skip to content

Commit 3ecc23f

Browse files
author
Bohdan Korablov
committed
MAGETWO-94369: [Forwardport] Move cron improvements from 2.2 to 2.3
1 parent bce847d commit 3ecc23f

File tree

4 files changed

+363
-257
lines changed

4 files changed

+363
-257
lines changed

app/code/Magento/Cron/Model/Schedule.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function setCronExpr($expr)
8787
{
8888
$e = preg_split('#\s+#', $expr, null, PREG_SPLIT_NO_EMPTY);
8989
if (sizeof($e) < 5 || sizeof($e) > 6) {
90-
throw new CronException(__('The "%1" cron expression is invalid. Verify and try again.', $expr));
90+
throw new CronException(__('Invalid cron expression: %1', $expr));
9191
}
9292

9393
$this->setCronExprArr($e);
@@ -184,7 +184,7 @@ public function matchCronExpression($expr, $num)
184184
}
185185

186186
if ($from === false || $to === false) {
187-
throw new CronException(__('The "%1" cron expression is invalid. Verify and try again.', $expr));
187+
throw new CronException(__('Invalid cron expression: %1', $expr));
188188
}
189189

190190
return $num >= $from && $num <= $to && $num % $mod === 0;

0 commit comments

Comments
 (0)