setDescription('Stop the scheduler'); return $this; } public function needPhraseaInstalled() { return true; } public function execute(InputInterface $input, OutputInterface $output) { if ( ! $this->checkPhraseaInstall($output)) { return 1; } require_once __DIR__ . '/../../../../lib/bootstrap.php'; try { $appbox = appbox::get_instance(\bootstrap::getCore()); $task_manager = new task_manager($appbox); $task_manager->setSchedulerState(task_manager::STATE_TOSTOP); return 0; } catch (\Exception $e) { return 1; } return 0; } }