setName('Core:Local') ->setDescription('Lauch Local Script') ; } protected function execute(InputInterface $input, OutputInterface $output) { $this->container = $this->getApplication()->getKernel()->getContainer(); $this->em = $this->container->get('doctrine')->getEntityManager(); $this->output = $output; $this->filesystem = new Filesystem(); $this->rootlog = $this->container->get('kernel')->getRootDir()."/../var/logs/"; return 1; } private function writelnred($string) { $this->output->writeln(''.$string.''); $this->filesystem->appendToFile($this->rootlog.'cron.log', $string."\n"); } private function writeln($string) { $this->output->writeln($string); $this->filesystem->appendToFile($this->rootlog.'cron.log', $string."\n"); } }