We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8352a97 commit b04cf0eCopy full SHA for b04cf0e
app/code/Magento/Cron/Model/Observer.php
@@ -353,7 +353,8 @@ protected function _cleanup($groupId)
353
$now = time();
354
/** @var Schedule $record */
355
foreach ($history as $record) {
356
- if (strtotime($record->getExecutedAt()) < $now - $historyLifetimes[$record->getStatus()]) {
+ $checkTime = strtotime($record->getExecutedAt() ? $record->getExecutedAt() : $record->getScheduledAt());
357
+ if ($checkTime < $now - $historyLifetimes[$record->getStatus()]) {
358
$record->delete();
359
}
360
0 commit comments