Most efficient cron command to call a php script?

7,943 pts.
Tags:
cron jobs
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
ASKED: November 17, 2009  9:04 PM
UPDATED: January 25, 2010  9:54 PM

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Michael Morisy
    Thanks a lot Gent01!
    7,943 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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following