I am trying to run a PHP script through a cronjob
. I already did this hundred of times, but now it's not working and I cannot figure out why.
I created a script called update_db.php
in /var/www/html/
When I run the script by hand:
php /var/www/html/update_db.php
everything works fine. When I put this into a cronjob
, it does nothing. My cronjob:
* * * * * /usr/bin/php /var/www/html/update_db.php
I tried to put a bash script in front of it that calls the PHP script, but, again, it only works when calling by hand, not from a cron.
There are no errors in the syslog. Also no mail in /var/mail
. I restarted cron already, but no effect.
I use ubuntu 14.04.
Can anyone help me?