/** * @ControllerManaged * * @param boolean $scheduled */ protected function setBackupScheduled($scheduled) { $statusContainer = $this->backupService->createStatusInformation(); if ($statusContainer->getOverallStatus() == StatusContainer::ERROR) { throw new EasyBackupException($this->trans->t('Not all preconditions are met, backup cannot be scheduled')); } $this->configService->setBackupScheduled($scheduled); if ($scheduled) { $this->backupService->scheduleBackupJob(); } else { $this->backupService->unScheduleBackupJob(); } }