1

I'm trying to run a PHP script everyday at midnight, so my cron has the following entry

@daily /usr/bin/php /websites/xxz/misc/wU5HaFre.php

/websites/xxz/misc/wU5HaFre.php has 755 rights, so it's executable.

which php provides /usr/bin/php, whereis php provides

php: /usr/bin/php /usr/bin/X11/php /usr/share/php /usr/share/man/man1/php.1.gz

So what's wrong? It just doesn't execute.

1 Answers1

0

It seems www-data is trying to run the script (is this what you want?) Run:

sudo -u www-data /usr/bin/php /websites/xxz/misc/wU5HaFre.php

in terminal and see what the output is, or if the script works.