Most enterprise ASP.NET web applications have one thing in common: Data Imports. Whether it is users, locations or transactions, 95%* of the applications that I've built for large corporations require some external data. Handling this in ASP.NET has always been troublesome for me, so I thought I'd share my method with you.
In the past, I've used Andy Brummer's scheduled timer to execute my scheduled tasks (http://www.codeproject.com/dotnet/ABTransClockArticle.asp) in conjunction with Paul Wilson's keep alive (http://authors.aspalliance.com/paulwilson/Articles/?id=12). This has been the best way that I've been able to make sure that the code will execute on the proper schedules.
Basically, a "timer" thread is executed when the application starts and is checked every millisecond. If the current "tick" is the same as the set scheduled total ticks, then it will execute the import.
I've been happy with this method and haven't run into any problems with it.
* estimated guess, I haven't done any in depth studies on it, but I've worked on enough applications to know that it's pretty much everyone.
10-03-2006 12:18 AM