Search code examples
phpcronlamp

What is difference between these two cron jobs?


I am very new to php, if anyone can help me by telling what the difference is between these two cron commands, I would be very thankful:

/usr/local/bin/php -q /home/delightl/public_html/myfolder/run.php

and

php -q /home/delightl/public_html/myfolder/run.php

I am totally confused.. On my GoDaddy server, the second command worked, but in another resellerclub server both worked. What is difference between these commands?


Solution

  • The only difference is that one specifies the full path to the PHP binary, and the other doesn't.

    PHP can be installed in different locations. That's why it works on one server, and not the other.