Search code examples
asp.net-mvcasp.net-mvc-3backgroundworkerobservers

Background task / job / process, in asp.net MVC 3


I don't know where to start or what to use to solve this 2 problems:

  1. I have a User model and a Event model (football match, karts race, etc). And I want that when a user creates a new Event send and email to other users.

  2. I need "something" that checks let's say every 15 minutes, delete all the Events that are already over (Example: Events from yesterday) from the database.

I know that in Ruby on Rails, there are Observers and Background Workers, there is something like that in MVC3 ? or there are other ways of accomplish that ?


Solution

  • Those kind of tasks are better suited to be done from a separate process such as a Windows service. You should avoid using background tasks in your web applications.