setDescription('Stop the scheduler'); return $this; } public function execute(InputInterface $input, OutputInterface $output) { if ( ! setup::is_installed()) { $output->writeln('Phraseanet is not set up'); return 1; } require_once __DIR__ . '/../../../../lib/bootstrap.php'; try { $appbox = appbox::get_instance(\bootstrap::getCore()); $task_manager = new task_manager($appbox); $task_manager->set_sched_status(task_manager::STATUS_SCHED_TOSTOP); return 0; } catch (\Exception $e) { return 1; } return 0; } }