سؤال

Cron is running but for some reason it's not executing the script. I have checked to see if the script works and it does. I am trying to make the PHP script execute every minute.

* * * * * /etc/php5 /var/www/cron/automatedScript.php

The server is Linux, Ubuntu distro.

هل كانت مفيدة؟

المحلول

You are most likely giving it the wrong php executable path :)

On MY system it would be:

* * * * * /usr/bin/php /var/www/cron/automatedScript.php

To confirm the correct path to use execute:

nm@vp:~$ which php

And this will return you the path similar to:

/usr/bin/php

نصائح أخرى

I think this may solve your problem

* * * * * /usr/bin/php -q /var/www/cron/automatedScript.php

Info : PHP path may be vary in different os. So you have to know right installtion path of PHP.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top