From 3a95d23d8b4b688683cbb37211272e58354604de Mon Sep 17 00:00:00 2001 From: jeroen Date: Mon, 26 Sep 2022 14:16:35 +0200 Subject: [PATCH] BUGFIX: We need to sleep at least 1 second or we get doubles --- src/Command/DaemonCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Command/DaemonCommand.php b/src/Command/DaemonCommand.php index 629b6e3..875f6f5 100644 --- a/src/Command/DaemonCommand.php +++ b/src/Command/DaemonCommand.php @@ -89,7 +89,7 @@ class DaemonCommand extends Command file_put_contents($this->kernel->getCacheDir() . '/daemon-running.lock', time()); $maxwait = time() + 30; - $nextrun = $jobRepo->getTimeOfNextRun(); + $nextrun = max($jobRepo->getTimeOfNextRun(), time() + 1); $sleepuntil = min($maxwait, $nextrun); if($sleepuntil > time()) time_sleep_until($sleepuntil); }