Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. APPLICATION TO RUN EVERY FEW SECONDS

APPLICATION TO RUN EVERY FEW SECONDS

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netquestion
9 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kibromg 0
    wrote on last edited by
    #1

    Hi All, I a page in ASP.net i want this page to run every two hours with out any manual intervation. How could i do it please? Inshort,i want the application to execute itself every two hours. Thank you.

    J H 2 Replies Last reply
    0
    • K kibromg 0

      Hi All, I a page in ASP.net i want this page to run every two hours with out any manual intervation. How could i do it please? Inshort,i want the application to execute itself every two hours. Thank you.

      J Offline
      J Offline
      J4amieC
      wrote on last edited by
      #2

      Have you considered that this is not what ASP.NET is used for? There are other, much more appropriate ways to achieve this such as sheduled tasks, or windows services.

      K H 2 Replies Last reply
      0
      • J J4amieC

        Have you considered that this is not what ASP.NET is used for? There are other, much more appropriate ways to achieve this such as sheduled tasks, or windows services.

        K Offline
        K Offline
        kibromg 0
        wrote on last edited by
        #3

        Thank you very much for your response. How will i setup the following URL to run every 2 hour. http://localhost:1257/Update\_Table/Default.aspx Thank you kibrom

        J 1 Reply Last reply
        0
        • K kibromg 0

          Thank you very much for your response. How will i setup the following URL to run every 2 hour. http://localhost:1257/Update\_Table/Default.aspx Thank you kibrom

          J Offline
          J Offline
          J4amieC
          wrote on last edited by
          #4

          You thanked me for my response, but did you actually read it? :confused:

          K 1 Reply Last reply
          0
          • J J4amieC

            You thanked me for my response, but did you actually read it? :confused:

            K Offline
            K Offline
            kibromg 0
            wrote on last edited by
            #5

            whats wrong with you man!Can you please be Polite. Take it easy.

            V 1 Reply Last reply
            0
            • J J4amieC

              Have you considered that this is not what ASP.NET is used for? There are other, much more appropriate ways to achieve this such as sheduled tasks, or windows services.

              H Offline
              H Offline
              hartertobak
              wrote on last edited by
              #6

              Well, actually I do understand the need for this kind of automation. Using ASP.NET to automize things can be very handy, when running the asp.net app on a shared webspace...much cheaper than buying dedicated servers. If using dedicated servers I agree, a windows service would do better.

              ASP.NET SEO Blog

              1 Reply Last reply
              0
              • K kibromg 0

                Hi All, I a page in ASP.net i want this page to run every two hours with out any manual intervation. How could i do it please? Inshort,i want the application to execute itself every two hours. Thank you.

                H Offline
                H Offline
                hartertobak
                wrote on last edited by
                #7

                Try this one: http://www.codeproject.com/KB/aspnet/ASPNETService.aspx[^] - that´s pretty much the best approach to this problem.

                ASP.NET SEO Blog

                J 1 Reply Last reply
                0
                • K kibromg 0

                  whats wrong with you man!Can you please be Polite. Take it easy.

                  V Offline
                  V Offline
                  Vasudevan Deepak Kumar
                  wrote on last edited by
                  #8

                  He is in fact polite, calm and poised and he has helped out in great depth. You ought to first read his full suggestion before embarking on your journey of throwing a counter-thread for clarification. Coming to your question, you can actually have a simple VBScript (VBS) file to use XmlHttp to hit the URL and get the response. You can have this VBS file scheduled to execute from your Windows Scheduled Tasks.

                  Vasudevan Deepak Kumar Personal Homepage
                  Tech Gossips
                  A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson

                  1 Reply Last reply
                  0
                  • H hartertobak

                    Try this one: http://www.codeproject.com/KB/aspnet/ASPNETService.aspx[^] - that´s pretty much the best approach to this problem.

                    ASP.NET SEO Blog

                    J Offline
                    J Offline
                    J4amieC
                    wrote on last edited by
                    #9

                    As one of the messages on that article states..."what a mess". There is no way that using the Cache is a good way to schedule tasks, mostly because you cannot guarantee that the cached item will not be removed before you ask it to (ie, in low memory conditions). You end up having to bolt workaround after workaround on top of this olution to handle early expiration of cache items. Do yourself a favour and write a VBS and use windows scheduler as someone suggested above.

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups