Running Cron In subfolder ?

I have the following setup



- console


--- controllers


----- SampleControoler


----- Mydir


---------MysampleController


Running cron works for the sample contoller like:

php yii sample/index

However I cannot seem to get it working for the ones in mydir

php yii mydir/mysample/index

unknown command… "mydir/mysample/index"

Any ideas?

have you set the right namespace?Also you write console,do you mean commands?


namespace app\commands\Mydir;

Thanks for your reply, yes the namespace was correct… and I do mean the console



- backend


- common


- console <== this one


- frontend


For others with the same problem… this solved it


console

- controllers

-- Cron


shell      : php yii cron\email/index

cron:  /usr/local/bin/php -q  sitepath/subfolder/yii cron\email/index



oops…sorry about this… still not working


 

php yii cron\email/index

php yii cron/email/index



both do not work to start the script

Finally got it working, it was the mix of captials taht was confusing me




php yii Cron/dst_cleanup/index

path/foldermain/yii Cron/dst_cleanup/index




Folders

console

-- controllers

---- Cron (!)


namespace console\controllers\Cron;

class Dst_cleanupController