Cron Job help

CMA

New member
Code:
*/5 * * * * /usr/local/bin/php /home/{nick}/public_html/{scriptname}.php

Can anyone tell me what I need to do to enable this.

Thanks in advance & sorry for any issues.

This is just for test, I hope it won't take to many resources:/
 

CMA

New member
I don't think so, even with 30 min just nothing happens, this is just test script with few lines of code..
Maybe I have no rights to execute this or something like this
 

un4saken

Administrator
Code:
[root@hero ~]# cat /var/log/cron | grep cma
Jan 6 15:00:03 hero CROND[20189]: (cma) CMD (/usr/local/bin/php /home/cma/public_html/{yourscriptname}.php >/dev/null 2>&1)

I've added >/dev/null 2>&1 to your cronjob so you will not get spammed by confirmation mails every 5 minutes.
 

CMA

New member
Hello un4saken,

Thank you for your time & checking this, unfortunately this way still doesn't work

But when I use this bypass:

*/5 * * * * wget http://domain.net/{script}.php >/dev/null 2>&1

It works fine, any idea why is it script issue or maybe php path?


Thanks
 

enzomatrix

New member
Maybe there's an error within the script.
Test it outside the cron job. Did it work if you call it from the browser?
Maybe you can put some debug information in the script so you can see if it's working.
 

CMA

New member
enzomatrix said:
Maybe there's an error within the script.
Test it outside the cron job. Did it work if you call it from the browser?
Maybe you can put some debug information in the script so you can see if it's working.

my script works correctly without cron, when I use different cron method than also cron works..