Working With Scheduled Task (Close Window in PageLoad)

Discussion in 'ASP.NET 2.0' started by Godot, May 3, 2007.

  1. I am setting up a scheduled task in DiscountASP that will call an ASP.NET 2.0 web page.
    NOTE: This will only run once a day.

    In the page load I am performing some database operations. Once the processing is done, I wantthe page go away. However, I'm not sure what to do to achieve the "go away" part.

    I can register a startup script that will call "window.close()", but that pops up a confirmation dialog asking if the page should be closed or not. Hardly helpful to my goal.

    I can call session.abandon and response.end, but I don't know if this is what I should do or just let the page render and wait for the web server to do something about it.

    Thoughts?


    -- Godot

    P.S. Sorry for the double-post, but quotes in my title truncated it into meaninglessness.
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    Paul,


    you kind of lost me.


    The scheduled task tool simply make a http call to the page and it doesn't wait for it to complete.


    What do you mean by setting the page to "go away"?





    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     

  3. When my page is called from the scheduled task I perform some processing in the page load.


    Once my page loads, then what happens?Does the page stay in memory until the session times out?


    I just want to know how best to clean up after myself when the processing in the page load completes.


    Do I need to do ANYTHING or just leave it to the web server?
     
  4. Bruce

    Bruce DiscountASP.NET Staff

    You don't need to do anything.


    The page should "quit" once it finish thepage load.


    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     

Share This Page