Cronjob issue

woonap

New member
Joined
Dec 30, 2009
Messages
2
Hi,

i tried to run the following cronjob:

Cronjob should run every 10 minutes, so i set:
*/10 * * * *

and the following in command line:
/usr/local/bin/php /home/myuser/domains/mydomain.com/public_html/cronjob/cronjob.php


On cPanel i run the following command and cronjob works without issues:

cd /home/myuser/public_html/cronjob/ && php cronjob.php


But when i run the cronjobs above nothing happens.

Hope someone can help!

Thanks in advance.

Cheers
Michael
 
Hi michael,

The way I run my cronjobs is the following

Via SSH
---------

crontab -u root -e *Change root to your username*

This then loads the cronjob part you can enter them into

Then enter

*/10 * * * * php -q /home/myuser/domains/mydomain.com/public_html/cronjob/cronjob.php auto=1 >/dev/null 2>&1

Save and exit :)

Please let me know how this goes.

Thanks,
Kevin.
 
Last edited:
Back
Top