C# 任务调度查询
您好,我曾经使用缓存过期回调为 ASP.Net 站点开发了一个调度程序。我现在有预算将站点移动到专用服务器,因此我使用计时器对象将调度程序编写为 Windows 服务 - 它在测试环境中运行良好。 我想知道计时器方法是否足够好。换句话说 - 创建一个强大的 C# 调度程序引擎的最佳设计策略是什么,该引擎可以每“n”分钟加载/调度配置/存储的任务。
Hi I have developed a scheduler sometime back for an ASP.Net site using cache expiration callbacks. I have the budget now to move the site to a dedicated server so I have written the scheduler as a windows service using a timer object - its working well in test envirinment.
I want to know if the timer approach is good enough for this. In other words - what are the best design strategies for creating a ROBUST C# scheduler engine which can load/dispatch the configured/stored tasks every 'n' minutes.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会使用 Quartz.NET。它经过充分测试,开源,我已经使用过多次,没有任何问题。
编辑:实际上,刚刚与一位同事谈论了调度,当轻量级解决方案就足够时,使用 Windows 计划任务是有话可说的(正如另一位海报所指出的)。
I would use Quartz.NET. It's well tested, open source and I've used it several times with no problems.
EDIT: Actually, having just spoken to a colleague about scheduling, there is something to be said for using windows scheduled tasks when a lightweight solution will suffice (as another poster pointed out).