Hello evry body I need some help please:
I need to create a crontab command but i have a big problem :
in commands
<?php
class CronTestCommand extends CConsoleCommand{
public function actionImporter()
{
$connection=Yii::app()->dbtest;
$model = new User();
var_dump($model);
}
}
then in config/console.php
‘import’=>array(
'application.models.*',
'application.components.*',
'application.modules.test.models.*',
'application.modules.test.components.*',
),
…
but always i have this problem
PHP Error[2]: include(/var/www/lde_socle/protected/modules/test/modules/test/models/_base/BaseUser.php): failed to open stream: No such file or directory
in file /var/www/Yii/framework/YiiBase.php at line 404
#0 /var/www/Yii/framework/YiiBase.php(404): autoload()
#1 unknown(0): autoload()
#2 /var/www/lde_socle/protected/modules/test/models/Test.php(23): spl_autoload_call()
#3 /var/www/Yii/framework/YiiBase.php(432): include()
#4 unknown(0): autoload()
#5 /var/www/lde_socle/protected/modules/administration/commands/CronTestCommand.php(15): spl_autoload_call()
#6 unknown(0): CronTestCommand->actionImporter()
#7 /var/www/Yii/framework/console/CConsoleCommand.php(172): ReflectionMethod->invokeArgs()
#8 /var/www/Yii/framework/console/CConsoleCommandRunner.php(71): CronTestCommand->run()
#9 /var/www/Yii/framework/console/CConsoleApplication.php(92): CConsoleCommandRunner->run()
#10 /var/www/Yii/framework/base/CApplication.php(184): CConsoleApplication->processRequest()
#11 /var/www/Yii/framework/yiic.php(33): CConsoleApplication->run()
#12 /var/www/lde_socle/protected/modules/administration/yiic.php(36): require_once()
Any Help
Thank you !