robov
(Robov99)
1
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?
dimis283
(Dimis283)
2
have you set the right namespace?Also you write console,do you mean commands?
namespace app\commands\Mydir;
robov
(Robov99)
3
Thanks for your reply, yes the namespace was correct… and I do mean the console
- backend
- common
- console <== this one
- frontend
robov
(Robov99)
4
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
robov
(Robov99)
5
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
robov
(Robov99)
6
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