title: Yii2 console script not working
body: <p>I want to automatically download my database backup weekly. I'm using xampp on windows. I've google around and found that I've to make use of windows task scheduler and the action script in my console controller. I've read <a href="http://www.yiiframework.com/wiki/646/how-to-implement-cron-in-yii-2/" rel="nofollow">this</a> and <a href="https://github.com/yiisoft/yii2/issues/10345" rel="nofollow">this</a> and tried running the command from command prompt. I'm getting 'Unknown command'.</p>
  
  <p>My code in console controller for now just for testing </p>
  
  <pre><code>&lt;?php
  namespace console\controllers;
  
  
  use Yii;
  use yii\console\Controller;
  
  /**
   * Cron controller
   */
  class TestController extends Controller {
  
      public function actionIndex() {
          echo "cron service runnning";
    }
  
  }
  </code></pre>
  
  <p>And my <code>main</code> config file </p>
  
  <pre><code>&lt;?php
  $params = array_merge(
      require(__DIR__ . '/../../common/config/params.php'),
      require(__DIR__ . '/../../common/config/params-local.php'),
      require(__DIR__ . '/params.php'),
      require(__DIR__ . '/params-local.php')
  );
  
  return [
      'id' =&gt; 'app-console',
      'basePath' =&gt; dirname(__DIR__),
      'bootstrap' =&gt; ['log'],
      'controllerNamespace' =&gt; 'console\controllers',
      'components' =&gt; [
          'log' =&gt; [
              'targets' =&gt; [
                  [
                      'class' =&gt; 'yii\log\FileTarget',
                      'levels' =&gt; ['error', 'warning'],
                  ],
              ],
          ],
           'authManager' =&gt; [
          'class' =&gt; 'yii\rbac\DbManager',
      ],
      ],
  
      'modules' =&gt; [
      'rbac' =&gt;  [
          'class' =&gt; 'johnitvn\rbacplus\Module'
      ]       
  ],
  
      'params' =&gt; $params,
  ];
  </code></pre>
  
  <p>The error I'm getting
  <a href="https://i.stack.imgur.com/xaVoF.jpg" rel="nofollow"><img src="https://i.stack.imgur.com/xaVoF.jpg" alt="enter image description here"></a></p>