Running Action From Comandcontroller With A Cronjob


I want to run an action of a ComandController using a cronjob.

But I don’t get it to work :(

When I call this on my console, everything works fine:

/path/to/yii/application/yii console/action-name

But, when I add this to my crontab, it is not working :(

*/1 * * * * /path/to/yii/application/yii console/action-name

The syslog tells me, that it is running:

Aug 13 15:38:01 Ubuntu-1110-oneiric-64-minimal CRON[6104]: (web) CMD (/path/to/yii/application/yii console/action-name)

Maschine is an ubuntu box…

Where can I look for errors?



By default at Ubuntu logs are put to /var/log/syslog.

Have you tried to run your command manually? I think you need to add php command (or path to php executable), e.g.

*/1 * * * * php /path/to/yii migrate/create