From f2b9c070a698d378be94750b4129b613347edb02 Mon Sep 17 00:00:00 2001 From: afornerot Date: Tue, 7 May 2019 15:27:53 +0200 Subject: [PATCH] =?UTF-8?q?gestion=20tache=20cron=20journali=C3=A8re?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Cadoles/CronBundle/Command/CronCommand.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ninegate-1.0/src/Cadoles/CronBundle/Command/CronCommand.php b/src/ninegate-1.0/src/Cadoles/CronBundle/Command/CronCommand.php index 0164ed73..774b140b 100644 --- a/src/ninegate-1.0/src/Cadoles/CronBundle/Command/CronCommand.php +++ b/src/ninegate-1.0/src/Cadoles/CronBundle/Command/CronCommand.php @@ -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); }