Design and Development > Site and Server Administration

setup cron to execute PHP file

(1/1)

Harry:
I am trying to setup a cron job for my web site but it doesn't seem to be working. I have set it as follow:

usr/local/bin/php /home/xxxxxxx/public_html/xxxxxx/cron.php

Am I missing something?

Thanks,

Harry

Kailash:
The cron seems to work fine but you forgot / in the cron command. It should be:

/usr/local/bin/php /home/xxxxxxx/public_html/xxxxxx/cron.php

You can also try the following cron to execute php file:

php -q /home/xxxxxxx/public_html/xxxxxx/cron.php

Kailash

Harry:
hmm... I was not aware it was the mistake. Now, cron job is working fine.

Harry

Navigation

[0] Message Index

Go to full version