How Can I Call Crontab For Command/action

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].


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 Cron', $count, 'Tester', '', '');




Anyone got an idea how to call the action?

bro just call that function inside run that should solve your problem

Hi alirz23,

thank for you info, i have try to create command action and test. In the end only i found out i have to remove the run function, else it will ignore the action that call from putty