Say I want to execute a PHP
script periodically, eg. /home/user/refresh.php
, I see several options to set up the cronjob:
# Option A: PHP interpreter
*/15 * * * * php-cgi /home/user/refresh.php
# Option B: curl
*/15 * * * * curl -L -s 'http://host.com/refresh.php'
# Option C: wget
*/15 * * * * wget -q --spider http://host.com/refresh.php
What are the differences, other than PHP not requiring an URL? Are there performance considerations? And which way is usually the best? The only question I found regarding this matter does not go into detail very much, and I'd like to establish some sort of good habits or best practice.