setInterval(60); } /** * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ #[\Override] public function run($argument) { $reminders = $this->reminderMapper->findOverdue(); foreach ($reminders as $reminder) { try { $this->reminderService->send($reminder); } catch (Throwable $e) { // A single broken reminder (e.g. orphaned user record) must not // stall the rest of the queue, which is ordered by due_date ASC // and would otherwise re-hit the same row on every cron tick. $this->logger->error('Could not send notification for reminder with id ' . $reminder->getId(), ['exception' => $e]); } } } }