Creating a Background Thread When the Web Site First Starts (professionalaspnet.com)

submitted by docluvdocluv(1575) 4 years, 5 months ago

There have been several instances along the way where a Web application I am developing would be served by having a thread periodically spin up to perform a needed task at a specified interval. For example the application may need to log the state of some variables every hour on the hour or perform an update against a database. I have found there are two ways to set this in motion, through the Application_Start event handler in the Global.asax file or by creating a custom httpModule. Either way the same worker method can be called to perform the needed task.

1 comment |category: |Views: 10

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by sirroccosirrocco(800) 4 years, 5 months ago 0

Really clean way of doing it. Nice.

Another way i've seen this done was :
- inserting an object into the Cache and when it expired ( you obviously would set that too) it would call a callback method that did your thing.

Reply

information Login or create an account to comment on this story