<p>Jeff has previously blogged about <a href="https://blog.stackoverflow.com/2008/07/easy-background-tasks-in-aspnet/">using the cache</a> to perform &quot;out of band&quot; processing on his websites, however I was wondering what other techniques people are using to process these sorts of tasks?</p>

[{'answer_id': 42825, 'author': 'Matt Hinze', 'author_id': 2676, 'author_profile': 'https://Stackoverflow.com/users/2676', 'pm_score': 2, 'selected': False, 'text': '<p>Windows Service</p>\n'}, {'answer_id': 42835, 'author': 'Blorgbeard', 'author_id': 369, 'author_profile': 'https://Stackoverflow.com/users/369', 'pm_score': 0, 'selected': False, 'text': '<p>Scheduled tasks, or cron jobs.</p>\n'}, {'answer_id': 42837, 'author': 'Jason Bunting', 'author_id': 1790, 'author_profile': 'https://Stackoverflow.com/users/1790', 'pm_score': 4, 'selected': True, 'text': '<p>Years ago, I saw Rob Howard describe a way to use an HttpModule to process tasks in the background. It doesn\'t seem as slick as using the Cache, but it might be better for certain circumstances.</p>\n\n<p><strong><a href="http://blogs.telerik.com/KevinBabcock/Posts/08-07-24/Using_an_HttpModule_to_Run_a_Background_Service.aspx" rel="noreferrer">This blog post</a></strong> has the details, and there are many others that capture the same information if you look around.</p>\n'}, {'answer_id': 42844, 'author': 'Jimmy', 'author_id': 4435, 'author_profile': 'https://Stackoverflow.com/users/4435', 'pm_score': 1, 'selected': False, 'text': "<p>if it's primarily data processing tasks and you're using MSSQL, how about scheduled SSIS tasks?</p>\n"}, {'answer_id': 42848, 'author': 'Kibbee', 'author_id': 1862, 'author_profile': 'https://Stackoverflow.com/users/1862', 'pm_score': 0, 'selected': False, 'text': "<p>The problem with scheduled tasks or cron jobs is that they don't share memory space with the web server.  You could set up a scheduled task that requested pages from the web server, but that might create problems with long running tasks.  It would be nice to have some low priority threads running on the actual ASP.Net application stack to do simple utility tasks like cleaning up caches, monitoring resources, and just to deal with general housekeeping.  </p>\n"}, {'answer_id': 42931, 'author': 'Dale Ragan', 'author_id': 1117, 'author_profile': 'https://Stackoverflow.com/users/1117', 'pm_score': 2, 'selected': False, 'text': '<p>You may want to look at how <a href="http://www.dotnetnuke.com/" rel="nofollow noreferrer">DotNetNuke</a> does it.  I know it is written in VB.NET, but I retrofitted the code into C#.  I was perusing the source and noticed they had a feature in their admin area to setup scheduled tasks.  These tasks get setup thru the admin interface and stored in the database.  When the site starts, thru the Global.asax file, they either created another thread to run this service that then runs the scheduled tasks at their scheduled time.  I can\'t remember the exact logic, it\'s been a while, but it is definitely a good resource on how other people have done out of band processes for Asp.Net applications.  This technique still keeps the logic within the Asp.Net application, but it runs out of band in my opinion.</p>\n'}, {'answer_id': 42960, 'author': 'thelsdj', 'author_id': 163, 'author_profile': 'https://Stackoverflow.com/users/163', 'pm_score': 0, 'selected': False, 'text': "<p>Simple queue files along with a separate agent. For each type of out of band process write a separate agent .exe which watches a directory for queue files that include whatever data is needed to perform the specified process.</p>\n\n<p>This may seem dirty but in the real world I find it  gives a lot of flexibility, you aren't doing a lot of processing in ASP.net process space and you could easily adapt this style to farm processing out to cheap Linux servers running the agent process on Mono for when you start needing more RAM/CPU/disk.</p>\n"}, {'answer_id': 47566, 'author': 'Geri Langlois', 'author_id': 4888, 'author_profile': 'https://Stackoverflow.com/users/4888', 'pm_score': 0, 'selected': False, 'text': '<p>If you are most comfortable with asp.net pages you can write a small app to handle your job and then "ping" the app with an outside service that monitors your web site. This will keep the app alive. </p>\n'}, {'answer_id': 1029723, 'author': 'Axl', 'author_id': 16605, 'author_profile': 'https://Stackoverflow.com/users/16605', 'pm_score': 1, 'selected': False, 'text': '<ul>\n<li>Scheduled tasks using <a href="http://www.codeproject.com/KB/cs/tsnewlib.aspx" rel="nofollow noreferrer">http://www.codeproject.com/KB/cs/tsnewlib.aspx</a> or <a href="http://msdn.microsoft.com/en-us/library/bb736357(VS.85).aspx" rel="nofollow noreferrer">schtasks.exe</a>.</li>\n<li><a href="http://quartznet.sourceforge.net/" rel="nofollow noreferrer">Quartz.NET</a></li>\n<li><a href="http://msdn.microsoft.com/en-us/library/system.messaging.aspx" rel="nofollow noreferrer">MSMQ</a></li>\n<li>SQL Server <a href="http://msdn.microsoft.com/en-us/library/ms187910.aspx" rel="nofollow noreferrer">jobs</a></li>\n<li><a href="http://msdn.microsoft.com/en-us/library/d56de412.aspx" rel="nofollow noreferrer">Windows service</a></li>\n<li><a href="http://msdn.microsoft.com/en-us/library/system.threading.timer.aspx" rel="nofollow noreferrer">System.Threading.Timer</a> or <a href="http://msdn.microsoft.com/en-us/library/system.timers.timer.aspx" rel="nofollow noreferrer">System.Timers.Timer</a></li>\n<li><a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx" rel="nofollow noreferrer">System.ComponentModel.BackgroundWorker</a></li>\n<li><a href="http://msdn.microsoft.com/en-us/magazine/cc163463.aspx" rel="nofollow noreferrer">Asynchronous</a> calls and callbacks</li>\n</ul>\n'}]
['https://Stackoverflow.com/questions/42822', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/493/']