how to schedule a task in MVC4 C#?

I wanna create a notification system on my website?(something like stack-overflow)
How can we schedule a task for mailing the notification for users on each 24 hours?

Can we use MVC4 or we should use windows service ?

Edit:
My Experience with using FluentScheduler in 3 month within a MVC4 App .
FluentScheduler is easy to config and using but it doesn't run tasks any time. Sometimes run and sometimes doesn't run.
I think the best way for scheduling is Windows Service to ensure running a task at the specific time.


Found this to be an awesome scheduler, FluentScheduler

Usage:

// Schedule an ITask to run at an interval
    Schedule<MyTask>().ToRunNow().AndEvery(2).Seconds();

You need a .Net Job Scheduler. Here is a good one: http://quartznet.sourceforge.net/


You can use ATrigger scheduling service. A .Net library is also available to create scheduled tasks without overhead. Errors log, Analytics, Tasks Listings and more benefits.

Disclaimer: I was among the ATrigger team. It's a freeware and I have not any commercial purpose.

链接地址: http://www.djcxy.com/p/84876.html

上一篇: 测量任务在Linux中2点之间花费的时间(任务分析)

下一篇: 如何在MVC4 C#中安排任务?