period); $current = new DateTimeImmutable(); while(true) { $now = new DateTimeImmutable(); if ($now->diff($current) === $period) { $this->runUpdate(); $current = $now; } } return Command::SUCCESS; } protected function runUpdate(): void { $command = '/app/bin/console update'; shell_exec($command); } }