running background processes

L

Lord Merlin

Hi there

Can someone please tell me how to run a script in the background? I have a
stored procedure, which gathers a lot of info on various tables in a MSSQL ,
and from that rebulds a large table. I run this stored procedure like so:
Response.write "Updating CWC Page .... wait until you see <b>Finished!</b>"
dbconnection.CommandTimeout = 0
DBConnection.Execute("proc_updatecwc")
Response.write "<bR><BR>Finished!<BR><BR>"

The problem is, this script takes about 3 minutes to complete, and then I
can't do other stuff on the site. This script needs to be run at regular
intervals, whenever new company information is added. Now, I want to be able
to add the new info, and let the script run in the background, without
waiting for the outcome / output. Can this be done?

--

Kind Regards
Rudi Ahlers
+27 (82) 926 1689

Greater love has no one than this, that he lay down his life for his friends
(John 15:13).
 
B

Bob Barrows [MVP]

Lord said:
Hi there

Can someone please tell me how to run a script in the background? I
have a stored procedure, which gathers a lot of info on various
tables in a MSSQL , and from that rebulds a large table. I run this
stored procedure like so: Response.write "Updating CWC Page .... wait
until you see <b>Finished!</b>" dbconnection.CommandTimeout = 0
DBConnection.Execute("proc_updatecwc")
Response.write "<bR><BR>Finished!<BR><BR>"

The problem is, this script takes about 3 minutes to complete, and
then I can't do other stuff on the site. This script needs to be run
at regular intervals, whenever new company information is added.

This is a contradiction. Either it needs to be run at regular intervals,
regardless of whether or not new company information has been added, or it
needs to be run on-demand, when new information is added.
Now,
I want to be able to add the new info, and let the script run in the
background, without waiting for the outcome / output. Can this be
done?

So you want it to be done on demand. Check out this article:
http://www.aspfaq.com/show.asp?id=2194

Bob Barrows
 
L

Lord Merlin

Hi Bob

Yes I know what your saying, and it sound funny. We run the script every now
and again, cause we don't know when other people add company info on the
site, thus we run it manually on a regular basis just to make sure it gets
run. But this is error prone, cause no one does it at night. Thanx for the
site, I'm looking at it now

--

Kind Regards
Rudi Ahlers
+27 (82) 926 1689

Greater love has no one than this, that he lay down his life for his friends
(John 15:13).
Lord said:
Hi there

Can someone please tell me how to run a script in the background? I
have a stored procedure, which gathers a lot of info on various
tables in a MSSQL , and from that rebulds a large table. I run this
stored procedure like so: Response.write "Updating CWC Page .... wait
until you see <b>Finished!</b>" dbconnection.CommandTimeout = 0
DBConnection.Execute("proc_updatecwc")
Response.write "<bR><BR>Finished!<BR><BR>"

The problem is, this script takes about 3 minutes to complete, and
then I can't do other stuff on the site. This script needs to be run
at regular intervals, whenever new company information is added.

This is a contradiction. Either it needs to be run at regular intervals,
regardless of whether or not new company information has been added, or it
needs to be run on-demand, when new information is added.
Now,
I want to be able to add the new info, and let the script run in the
background, without waiting for the outcome / output. Can this be
done?

So you want it to be done on demand. Check out this article:
http://www.aspfaq.com/show.asp?id=2194

Bob Barrows
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,830
Latest member
HeleneMull

Latest Threads

Top