Putting a delay into a loop ?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Les Juby (webpro_at_webpro.co.za)
Date: 03/16/04


Date: Tue, 16 Mar 2004 13:06:10 GMT

I have an application which loops through several thousand subscriber
records, compares each subscriber's requirements to a database of
businesses for sale, and then prepares and mails off an email
containing info from the database that the client is interested in.

Problem is that the ASP file exits as soon as it has sent about 50 or
so records to the Mercury/32 mail server on the local Ethernet. No
error message or program execution issues noticed. I then delete the
first 100 or so subscriber records and set the file off again. In the
loop thru the next 100 subscribers it prepares an email for approx
every second subscriber, then seems to hit this 50 max limit and
terminates again. Driving me crazy.

I figure that somewhere there's a queue building up which maxes
something out and causes some low level termination. To test that,
I'd like to build something into the loop thru the subscriber file
that causes a delay of 10 seconds or so before the loop starts again.

Can someone please suggest a function or code snippet that would do
this.?

   thanks

       .les.

o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o
  Les Juby lesjuby@anti-spam.iafrica.com
  Webpro Internet - - - Prosoft Microsystems
  Durban, KwaZulu-Natal, South Africa
  P.O.Box 35243, Northway 4065, South Africa
  Tel: +27 31 563-8344 Fax: +27 31 564-4928
o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o
(you *do* know to take "anti-spam" out the address....?



Relevant Pages

  • Re: Putting a delay into a loop ?
    ... SQL Server MVP ... > first 100 or so subscriber records and set the file off again. ... > loop thru the next 100 subscribers it prepares an email for approx ... > something out and causes some low level termination. ...
    (microsoft.public.inetserver.asp.general)
  • Subscriber Line Measurement and SLAC Settings
    ... SLAC parameters. ... about it like how the parameters are to be set for Short Loop or Long ... The Loop Resistance of a subscriber line is a combination of Cable ...
    (comp.arch.embedded)
  • Endless while loops?
    ... learn how to build dynamically driven sites. ... either a "for" loop, or a "while" loop to accomplish this. ... and information about the mailing list subscriber. ... Nothing seems to change $subscriber within the "while" loop's ...
    (php.general)
  • Re: SQL2000 - Merge Replication - Timeout error
    ... The timeout is in your publisher and distributor server, ... Then, update the database statistics. ... Run profiler on the subscriber to see what is going on? ...
    (microsoft.public.sqlserver.replication)
  • Re: How to work with m:n relationships?
    ... Do NOT use SSN in a DBMS if you can possibly help it, ... you'll explain why you don't permit a subscriber to ... St and I will call it St-solution. ... We can use these objects to connect to a database, ...
    (comp.databases.theory)