My ASP.NET application needs a number of supporting services to run periodically in the background. For example:
- I need to query the database (or cache) every 1-5 minutes, identify overdue work items and notify users by email
- I need to generate nightly reports that are then emailed to subscribers
- Plus other system/non-user admin tasks
What is the best way to implement these services? Should I include them as part of the web application, starting an instance of each 'service' in Application_Start()? Or create them as actual standalone services? If they were part of the web application I can potentially utilize my cached data store, but are there any downsides to this approach?
Thanks for any advice.