Timers in global.asax

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mubi

    Timers in global.asax

    I am using VS2003 and developing web services. We also need a timed
    activity to be performed on the server. If i drag a timer and place it
    on global.asax, add interval and timer handler. it doesnot work. Is
    there anyone with the answer. How could i achieve this functionality.
  • Patrice

    #2
    Re: Timers in global.asax

    A web application is IMO not well suited for this kind of task. Basically it
    runs when a user hit the server.

    My personal preference would be by far to create a separate application to
    do that. As most often it's best to tell also *waht* you are trying to do.
    For example if this is a DB related task and you are using SQL Server,
    creating a SQL Server scheduled job would be likely much simpler...

    --
    Patrice

    "Mubi" <mmubashirkhan@ yahoo.coma écrit dans le message de news:
    54c6ba61-dd1e-40c8-a91a-2e120c7bf9f3...l egroups.com...
    >I am using VS2003 and developing web services. We also need a timed
    activity to be performed on the server. If i drag a timer and place it
    on global.asax, add interval and timer handler. it doesnot work. Is
    there anyone with the answer. How could i achieve this functionality.

    Comment

    • =?Utf-8?B?UGhpbCBKb2huc29u?=

      #3
      RE: Timers in global.asax

      Mubi,

      I recently implemented an application that needed to refresh data from a
      feed every minute and I was going to try to use a timer on it.

      I had the same problem as you, so what I did was, in the begin request even
      handler in the global asax, I updated my data from the feed then put the time
      into an application state variable. on every begin request, if the current
      time was more than a minute on from the one stored in the application state
      variable then it updated the data from the feed and also updated the
      application state variable

      This approach is working for my situation. You probably need to define if
      you need your timed event to run twenty four seven, or is it only required
      when people are accessing the service?

      --
      Regards,

      Phillip Johnson (MCSD For .NET)
      PJ Software Development



      "Mubi" wrote:
      I am using VS2003 and developing web services. We also need a timed
      activity to be performed on the server. If i drag a timer and place it
      on global.asax, add interval and timer handler. it doesnot work. Is
      there anyone with the answer. How could i achieve this functionality.
      >

      Comment

      Working...