Hi all,
I would like to know how can i run the command action but not default action function run? i have an command name auth and i would like to run for actionRemoveSsoToken. When i run from putty, i use this command : php console.php Auth RemoveSsoToken
i was using Yii extension crontab to run it, but the result was it will call function run and RemoveSsoToken will become an array for args[0].
<?php
class AuthCommand extends CConsoleCommand
{
public function getHelp()
{
echo "Deleted unconfirmed registration entries";
}
public function run($args)
{
echo 'run';
}
public function actionRemoveSsoToken(){
$modelSsoToken = new SsoToken();
$count = $modelSsoToken->clearSsoToken();
$classEmail->sendMail('test@gmail.com', 'Test Cron', $count, 'Tester', 'test2@gmail.com', '');
}
}
?>
Anyone got an idea how to call the action?