running background processes

Discussion in 'ASP General' started by Lord Merlin, Jun 5, 2004.

  1. Lord Merlin

    Lord Merlin Guest

    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).
    Lord Merlin, Jun 5, 2004
    #1
    1. Advertising

  2. Lord Merlin wrote:
    > 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
    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows [MVP], Jun 5, 2004
    #2
    1. Advertising

  3. Lord Merlin

    Lord Merlin Guest

    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).
    "Bob Barrows [MVP]" <> wrote in message
    news:...
    Lord Merlin wrote:
    > 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
    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Lord Merlin, Jun 6, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?amVzdGVy?=

    Background processes and session timeout

    =?Utf-8?B?amVzdGVy?=, Apr 28, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    536
    =?Utf-8?B?amVzdGVy?=
    Apr 29, 2005
  2. Jeff Rodriguez
    Replies:
    23
    Views:
    1,084
    David Schwartz
    Dec 9, 2003
  3. David L. Jessup

    win32pdh and background processes

    David L. Jessup, Jul 1, 2004, in forum: Python
    Replies:
    0
    Views:
    391
    David L. Jessup
    Jul 1, 2004
  4. Phil Tomson
    Replies:
    2
    Views:
    203
  5. Marc Heiler
    Replies:
    1
    Views:
    161
    Robert Klemme
    May 24, 2009
Loading...

Share This Page