Question

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.

Was it helpful?

Solution

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

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top