running console command from bash

Hi there,

I can run my console command using yiic shell and then typing the command at the prompt. If I type help at the yiic shell prompt I can also see my command in the list. When I try and run it like this:

$> yiic myCommand

I do not get anything. I also created a bootstrap file called index-console.php that looks like this:


// change the following paths if necessary



// remove the following lines when in production mode

defined('YII_DEBUG') or define('YII_DEBUG',true);

// specify how many levels of call stack should be shown in each log message

defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);



And then run:

php index_console.php myCommand

But I get the error:

No available commands.

Please define them under the following directory: [cwd]/protected/commands

This is because my command are in [cwd]/protected/commands/shell

Is there a way to run console commands from bash shell in a non interactive fashion. I would like to add them to a cron schedule.



Just try and set [font="Arial, sans-serif"][size="2"][color="#222222"]commandPath [/color][/size][/font][color=#222222][font=Arial, sans-serif][size=2]in command [/size][/font][/color][font="Arial, sans-serif"][size="2"][color="#222222"]config file.[/color][/size][/font]