addOption('parent', InputOption::VALUE_OPTIONAL, 'Parent id', null); $this->addOption('id', InputOption::VALUE_OPTIONAL, 'Child id', null); } /** * Execute command in the loop * @param InputInterface $input * @param OutputInterface $output */ final protected function execute(InputInterface $input, OutputInterface $output) { $parent = $input->getOption('parent'); $id = $input->getOption('id'); $parentHypervior = new Hypervisor($this->getName()); //Lock parent if(!$parent) { $parentHypervior->lock(); } else { $parentHypervior->checkIfRunning(); } if($id) { } do { parent::process($input, $output, new SymfonyStyle($input, $output)); sleep($this->loopInterval); } while(!$hypervisor->isStopped()); } /** * @param $jobs[] */ protected function processJobs($jobs) { foreach($jobs as $job) { } } }