Starting a Schedule task in ASP.NET

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jumbojs
    New Member
    • May 2009
    • 20

    Starting a Schedule task in ASP.NET

    I want to call a method in a web page that I want to call every hour on my web application and run the code. I have now Idea of how to do this. Any help would be appreciated. Thanks
  • sanjib65
    New Member
    • Nov 2009
    • 102

    #2
    Yes it can be done but you have to combine Web and Windows Services to Run Your ASP.NET Code at Scheduled Intervals.

    It has been done in details here:

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      I have no idea what you are asking.

      You have a web page and within that web page you have a method...
      Is that method a JavaScript Method (in the web page client side)?
      Or are you talking about a method that is on the server?

      Do you want the method to be called by the web page while the user is viewing it?
      Or do you want the method to be called by an outside application that invokes something?


      Please provide more details about what you're trying to do.

      -Frinny

      Comment

      • jumbojs
        New Member
        • May 2009
        • 20

        #4
        Here, let me try a different approach. When using Cold Fusion, we have a cold fusion administrator that contains a section for logging and debugging. In this section, there is a place to schedule automated tasks that basically just "hit" a web page and in my case, on page load, starts a batch process. I'm looking for the same functionality for asp.net. Isn't there a way to schedule a task that just "hits" a web page. This should be an option in windows schedule tasks.

        Comment

        • NitinSawant
          Contributor
          • Oct 2007
          • 271

          #5
          take a look at

          Comment

          • sanjib65
            New Member
            • Nov 2009
            • 102

            #6
            What Frinavale asked has valid points, at first, it seemed really quite impossible to me. Though the link provided by Nitin is good.

            Comment

            • Frinavale
              Recognized Expert Expert
              • Oct 2006
              • 9749

              #7
              Normally I would say that you would have to implement a windows service to do this but...

              NitinSawant's post is actually quite interesting.

              What isn't mentioned in that article is that the you need to use the Global.asax file to do this. If you don't know about the Global.asax file then you should research it first because there are some peculiar things about it that people tend to misunderstand.

              I'm curious to see if you can get this to work as the article suggests.


              -Frinny

              Comment

              Working...