Forum Moderators: coopster

Message Too Old, No Replies

Worried About Script Timeouts

         

aeae

11:46 am on Jan 29, 2008 (gmt 0)

10+ Year Member



I have a script activated by a cron job that runs once a day. What it does it to loop through a list of about 20 urls and reads the contents via the file_get_contents function. After cycling through all the urls, it creates a report via the fopen and fwrite functions.

While it works just fine, it takes a while, about 18 seconds. I don't mind how long it takes, its a cron job running--it's not like I'm waiting. However, I'm concerned about the script timing out and not completing the list or reports, if in the future if I add more urls or if some sites on the list are just sluggish for the day.

I know I can split my list in half, but this seems like a bandaid for the real problem. It dosn't even address if a site is just sluggish.

How might I address this concern?

PHP_Chimp

12:00 pm on Jan 29, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have a look at -
[webmasterworld.com...]
As there seem to be 2 of you with the same problem.