0

I added the following entry into my /etc/crontab file to execute a PHP script at 11:55 every Tuesday.

However, it does not seem to work

55 11   * * 2   root    /var/www/html/projectone/php/populatefromshellfix.php
saltandwater
  • 791
  • 2
  • 9
  • 25
  • 1
    the `root` looks suspicious to me, have you tried without it? What file are you putting this line in and how? `crontab -e`? – Stefan Hegny Jun 14 '16 at 12:20
  • 2
    What if you say `55 11 * * 2 root /usr/bin/php -f /var/www...`? See [Why is crontab not executing my PHP script?](http://stackoverflow.com/a/17362250/1983854). – fedorqui Jun 14 '16 at 12:33
  • All good points above. Add `> /tmp/comshellfix.log 2>&1` at the end of your command. Then you can easily examine any error messages that are being generated. Good luck. – shellter Jun 14 '16 at 12:40
  • Without editing crontab, check that your php script has execution permissions (`chmod a+x /var/www/html/projectone/php/populatefromshellfix.php`) and that the first line of the php files is `#!/usr/bin/php` – fedterzi Jun 14 '16 at 13:23

0 Answers0