title: How to call a console command in web application action in Yii?
body: <p>I have a console command to do a consumer time, AND I need to know how to call (execute) it in a web application action in YII.</p>
  
  <pre><code>class MyCommand extends CConsoleCommand{
        public function actionIndex(){
            $model = new Product();
            $model-&gt;title = 'my product';
            ...
            $model-&gt;save();
            .
            .
            .
        }
  }
  </code></pre>
  
  <p>I want to execute this code.</p>