如何安排在MVC4 C#中的任务吗? [英] how to schedule a task in MVC4 C#?

查看:179
本文介绍了如何安排在MVC4 C#中的任务吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的网站上创建一个通知系统?(像堆栈溢出)结果
我们如何计划任务在邮寄通知各24小时用户?结果

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?

我们能否用MVC4还是应该使用Windows服务?

Can we use MVC4 or we should use windows service ?

编辑:

我的经验用 FluentScheduler 3一个月MVC4应用程序中。

FluentScheduler 易于配置和使用,但它不运行任务的任意时间。有时运行有时不运行。

我认为调度的最好办法就是 Windows服务,以确保在特定时间运行的任务。


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.

推荐答案

发现这是一个真棒调度, FluentScheduler

Found this to be an awesome scheduler, FluentScheduler

用法:

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

这篇关于如何安排在MVC4 C#中的任务吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆