What Is Command In Crontab With Yii-Crontab?

if i run "/usr/bin/php /var/www/html/cron/app/console.php myCron testCron" in command line ok, what is command in crontad with centOs? help me.

who can help me?

What exactly is not clear?

Where to put the command or what to change in it? Or anything else?

Actually, if you need something CentOS sever specific, you just may find a lot of helpful information at internet. If you tried, but still something is unclear, please be more specific on this point.

Thanks yugene. I searched and tested very much, but my crontab not run. so I asked on the forum.

I run "/usr/bin/php /var/www/html/cron/app/console.php myCron testCron" in command line ok. but I inserted

“* * * * * root /usr/bin/php /var/www/html/cron/app/console.php myCron testCron” into /etc/crontab. it don’t run.

Note : crontab in centos run normally. I fear that by my command structure. I refer to the experience of those who have successfully run crontab with yii-crontab.

I don’t want to run crontab with url “* * * * * root curl” to replace.

help me.

  1. So, the other commands with the same structure works properly?

  2. First of all, carefully check you have correct path in the command.

[size=2]3. Specify to make logging (log all messages, not only errors) in your yii console config file to get additional information.[/size]

  1. You may put a debug line right in the beginning of your command class to check it is called at all.

I would check/make these 4 points first.

Thank you. I was successful.I did find out the cause.

when i read log crontab in path “/var/log/cron”. I see text in log file “Dec 2 10:23:01 mycron CROND[7475]: (root) CMD (/usr/bin/php /var/www/html/cron/app/console.php myCron testCron^M)”. “testCron^M” is cause, it not my action :)). i change command in crontab

"* * * * * root /usr/bin/php /var/www/html/cron/app/console.php myCron testCron >> /var/log/con.log". when in log I see "Dec 2 10:23:01 mycron CROND[7475]: (root) CMD (/usr/bin/php /var/www/html/cron/app/console.php myCron testCron >> /var/log/con.log^M)". "^M" is added after my log file and so my conmand is true. it has run really. My problem is solved

Thanks forum again. I hope this helps anyone having similar problems.