473,395 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Putting a delay into a loop ?

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 le*****@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....?
Jul 19 '05 #1
2 3147
http://www.aspfaq.com/2141
http://www.aspfaq.com/2291

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Les Juby" <we****@webpro.co.za> wrote in message
news:40***************@news.uunet.co.za...
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 le*****@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....?

Jul 19 '05 #2
Don't know if something along these lines would give you more time for
your code to fully execute:

' Script timeout in seconds for this page.
' (60 x 1 = 1 min.)
Server.ScriptTimeout = 60 * 1

Best regards,
J. Paul Schmidt, Freelance ASP Web Consultant
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Conrad | last post by:
Greetings, Q: Is there some way to gracefully suspend a python app for a second or so then resume? I could write the classic basic dumb loop-tenzillion-times delay, but that seems inelegant, and...
14
by: Des L. Davis | last post by:
System: Dell PowerEdge Server with 3 GB RAM, 2.4 GHz Celeron Software: Microsoft SQL Server 2000 Enterprise running on Windows 2003 Server Software: Microsoft SQL Server 2000 Enterprise running on...
2
by: lynology | last post by:
My program takes in a key pressed value from the main routine and based on the key pressed, it selects the command to be executed. The problem I have is in creating a delay timer so that a message...
1
by: lynology | last post by:
My program takes in a key pressed value from the main routine and based on the key pressed, it selects the command to be executed. The problem I have is in creating a delay timer so that a message...
6
by: lucifer | last post by:
hi i need to insert delay in my program what function should i use the old delay is not supported by the VC6
20
by: Doug Thews | last post by:
I ran into an interesting re-pain delay after calling the Abort() method on a thread, but it only happens the very first time I call it. Every time afterward, there is no delay. I've got a...
11
by: Maheshkumar.R | last post by:
Hi groups, How i can introduce some milliseconds delay in application. How i can do achieve this... let me clearly say... (1) I'm displaying slices of medical images. For framerate - for...
4
by: D. Shane Fowlkes | last post by:
I've decided to send weekly emails to registered users ("members") on one of my sites. This will be the first time I attempted anything like this. Now I know I could use some 3rd party list...
6
by: sheldonlg | last post by:
I came across a problem and googling for an answer didn't help. What I want to do is run an AJAX script that sets a hidden variable on the form. I call the AJAX script from a javascript...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.