locked
Schedule ASP.NET script to run. RRS feed

  • Question

  • User-701393679 posted

    Hello all.  I have a quick question that I hope someone could help me out with.  I've done a great deal of research over this issue, but have found little in return.  I have found a few listings, but they all seemed a little thrown together.  Basically, what I want to do is schedule a script to run a collection of stored procedures every night at midnight.  This could easily be done in a controlled environment, but I am going to be using a hosting service to host my site.  Is there any possible way I can put together/do something that is able to invoke this script to run every day?  The link one possibility is listed at:

    http://www.codeproject.com/KB/aspnet/ASPNETService.aspx

    This seems to get the job done, but it uses expiring cache and you must leave the page open for it to run.  Any suggestions would be tremendously appreciated.  Thanks in advance.

    Wednesday, May 14, 2008 1:20 PM

Answers

  • User-1952482173 posted

    Usually, that kind of job is done by a scheduled Console Application instead of a web application in .NET. You create a Console application first, then, schedule the appplication to run at some interval time. in this case, you don't need to do it through a hosting service becasue it is not a web application.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 14, 2008 2:58 PM
  • User-168748142 posted

    if it is just a matter of running a few stored procedures.

    Not sure which database you are using but SQL server has "jobs" and you can schedule it to run your stored procs.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 14, 2008 3:58 PM

All replies

  • User-1952482173 posted

    Usually, that kind of job is done by a scheduled Console Application instead of a web application in .NET. You create a Console application first, then, schedule the appplication to run at some interval time. in this case, you don't need to do it through a hosting service becasue it is not a web application.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 14, 2008 2:58 PM
  • User-168748142 posted

    if it is just a matter of running a few stored procedures.

    Not sure which database you are using but SQL server has "jobs" and you can schedule it to run your stored procs.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 14, 2008 3:58 PM
  • User-701393679 posted

    Hey, thanks guys for all the help.  Makes sense.

    Wednesday, May 14, 2008 4:00 PM