Adjust cronjob interval to ensure daily execution

The interval for `AccompanyingPeriodStepChangeCronjob` was reduced from 24 hours to 23 hours and 45 minutes. This change guarantees at least one execution per day, addressing potential issues with timing overlaps.
This commit is contained in:
Julien Fastré 2025-04-09 21:30:41 +02:00
parent fe6949ea26
commit b9b4fafe14
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
2 changed files with 7 additions and 1 deletions

View File

@ -0,0 +1,6 @@
kind: Fixed
body: Shorten the delay between two execution of AccompanyingPeriodStepChangeCronjob, to ensure at least one execution in a day
time: 2025-04-09T21:29:58.591267777+02:00
custom:
Issue: ""
SchemaChange: No schema change

View File

@ -26,7 +26,7 @@ readonly class AccompanyingPeriodStepChangeCronjob implements CronJobInterface
{
$now = $this->clock->now();
if (null !== $cronJobExecution && $now->sub(new \DateInterval('P1D')) < $cronJobExecution->getLastStart()) {
if (null !== $cronJobExecution && $now->sub(new \DateInterval('PT23H45M')) < $cronJobExecution->getLastStart()) {
return false;
}