Most efficient cron command to call a php script?

8598 pts.
Tags:
PHP Coding
PHP scripts
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

Answer Wiki

Thanks. We'll let you know when a new response is added.

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.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Michael Morisy
    Thanks a lot Gent01!
    8,598 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: