Sergi Papaseit
Sergi Papaseit

Reputation: 16204

Using an Action Method to handle scheduled tasks in ASP.NET MVC 3

I have an ASP.NET MVC 3 site hosted on a normal hosting provider and have just discovered that they offer "scheduled tasks" functionality whereby a url (or Action Method) will be called on a defined interval.

I'm planning to use it to send emails stored in a database, so the action method will be called say every 15 minutes.

Do you foresee any issues, or would you simply advise against it? why?

Note: before coming across the "scheduled tasks" functionality I was planning to use Quartz.NET (see this other question of mine).

Which would you recommend?

Upvotes: 0

Views: 896

Answers (1)

rcravens
rcravens

Reputation: 8388

Sounds like they are both viable solutions. In cases like these I tend to chose the implementation that minimizes complexity. IMO...that is using the ISP's task scheduler. Abstract out the code doing the actual work. That way if you need to add the complexity of your own cron, nothing is wasted.

Upvotes: 1

Related Questions