gestion tache cron journalière

This commit is contained in:
afornerot 2019-05-07 15:27:53 +02:00
parent 8fae9aecd5
commit f2b9c070a6
1 changed files with 6 additions and 1 deletions

View File

@ -92,7 +92,12 @@ class CronCommand extends ContainerAwareCommand
// Date prochaine execution
if($cron->getrepeatinterval()>=0) {
$next=new \DateTime();
// Si interval par jour
if(fmod($cron->getRepeatinterval(),86400)==0)
$next=clone $cron->getNextexecdate();
else
$next=new \DateTime();
$next->add(new \DateInterval('PT'.$cron->getRepeatinterval().'S'));
$cron->setNextexecdate($next);
}