reminderService = $reminderService; $this->config = $config; // Run every 5 minutes $this->setInterval(5 * 60); $this->setTimeSensitivity(self::TIME_SENSITIVE); } /** * @throws \OCA\DAV\CalDAV\Reminder\NotificationProvider\ProviderNotAvailableException * @throws \OCA\DAV\CalDAV\Reminder\NotificationTypeDoesNotExistException * @throws \OC\User\NoUserException */ public function run($argument):void { if ($this->config->getAppValue('dav', 'sendEventReminders', 'yes') !== 'yes') { return; } if ($this->config->getAppValue('dav', 'sendEventRemindersMode', 'backgroundjob') !== 'backgroundjob') { return; } $this->reminderService->processReminders(); } }