title: ContainerAwareCommand with get doctrine
body: <p>I try use doctrine in cron job , i try follow some suggestion from stack and find to use </p>
  
  <blockquote>
    <p>ContainerAwareCommand</p>
  </blockquote>
  
  <p>but seem have a problem with kernel , every time don't found him , here is my simple cron
  namespace Site\Bundle\AdminBundle\Services\Cron;</p>
  
  <pre><code>class EuropatourCron extends \Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand
  {
      protected function configure() {
          parent::configure();
          $this-&gt;setName("updateInfo")
                  -&gt;setDescription("Update db with offert from Europatours.at")
                  -&gt;addArgument('install');
      }
  
      protected function execute(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output) {
          $toDo = $this-&gt;getContainer()-&gt;get('doctrine')-&gt;getRepository('SiteAdminBundle:Europatoursofertacron')-&gt;findBy(array(
              'status' =&gt; 0
          ));
  
          $output-&gt;writeln(\Doctrine\Common\Util\Debug::dump($toDo));
      }
  }
  </code></pre>
  
  <p>and here is my file from test:</p>
  
  <pre><code>// application.php
  require_once 'vendor/autoload.php';
  require_once 'src/Site/Bundle/AdminBundle/Services/Crons/EuropatourCron.php';
  use Site\Bundle\AdminBundle\Services\Cron\EuropatourCron;
  use Symfony\Component\Console\Application;
  
  $application = new Application();
  $application-&gt;add(new EuropatourCron);
  $application-&gt;run();
  </code></pre>
  
  <p>i was try found a reson for this error but no found:</p>
  
  <blockquote>
    <p>PHP Fatal error:  Call to undefined method Symfony\Component\Console\Application::getKernel() in /var/www/europatur/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ContainerAwareCommand.php on line 42</p>
  </blockquote>