config->setAppValue($this->appName, 'generateBirthdayCalendar', 'yes'); // add background job for each user $this->userManager->callForSeenUsers(function (IUser $user): void { $this->jobList->add(GenerateBirthdayCalendarBackgroundJob::class, [ 'userId' => $user->getUID(), ]); }); return new JSONResponse([]); } /** * @return Response */ #[AuthorizedAdminSetting(settings: CalDAVSettings::class)] public function disable() { $this->config->setAppValue($this->appName, 'generateBirthdayCalendar', 'no'); $this->jobList->remove(GenerateBirthdayCalendarBackgroundJob::class); $this->caldavBackend->deleteAllBirthdayCalendars(); return new JSONResponse([]); } }