1180 pts.
Q:
Most efficient cron command to call a php script?
Any thoughts on the most efficient Cron command to call a php script? Basically, I want to trigger a page to run the script, so I'm currently using Lynx after I was worried my previous command (wget -O - -q -t 1 http://www.example.com/cron.php) was creating extra files in some dark corner of my server. It was also also suggested curl --silent --compressed might do the trick, but I'm wondering if anyone has guidance in terms of best practices? Was wget really populating my server with unccessary files, or am I misreading the log files?

Software/Hardware used:
PHP
ASKED: Nov 17 2009  9:04 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
1525 pts.
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • Bookmark and Share
wget -q -t 1 -O /path_to_dir/file_name URL >> /dev/null 2>&1

Should do the trick. The only output generated by this should only be the file you asked it to make. With the exception of errors. If your command generated an error, the errors will go to the log file.
Last Answered: Jan 22 2010  7:53 PM GMT by Gent01   1525 pts.
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Michael Morisy   1180 pts.  |   Jan 25 2010  9:54PM GMT

Thanks a lot Gent01!