Forum Moderators: coopster

Message Too Old, No Replies

Long chron jobs

         

Vis3R

1:43 am on Mar 15, 2008 (gmt 0)

10+ Year Member



Hello,

I have a chron job, a php script, which should execute like 4 times per day. The "problem" is that the chron job takes a few hours to finish, because it connects to thousands of domains, checking if they are online, and saving the results in the database.

Now, i was wondering if this is a problem, or is it not unusual for a chron job to last that long? Is there any problems i might run into with such a long chron job? (i've set the script max execution time to 0) Please post your comments about this.. thanks!

vincevincevince

3:06 am on Mar 15, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't think there is a problem there; but you could speed things up by:
  • Caching DNS entries for domains - saving lots of lookups
  • Running multiple copies of the script, each with different subsets of the domains list
  • DrDoc

    6:40 am on Mar 15, 2008 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    As long as it doesn't get hung, but will always run to completion, there is really nothing wrong with it. But, vincevincevince's suggestions above should really be considered.