mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 19:13:49 +00:00
fixed: take into account the first iteration of the cronjob
This commit is contained in:
@@ -27,6 +27,10 @@ final readonly class CollateAddressWithReferenceOrPostalCodeCronJob implements C
|
||||
|
||||
public function canRun(?CronJobExecution $cronJobExecution): bool
|
||||
{
|
||||
if (null === $cronJobExecution) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$now = $this->clock->now();
|
||||
|
||||
return $now->sub(new \DateInterval('PT6H')) > $cronJobExecution->getLastStart();
|
||||
|
Reference in New Issue
Block a user