嵌入或作为Windows服务运行Quartz.NET的利与弊 [英] Pros and Cons of running Quartz.NET embedded or as a windows service

查看:203
本文介绍了嵌入或作为Windows服务运行Quartz.NET的利与弊的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将石英调度添加到ASP.NET应用程序中.

I want to add quartz scheduling to an ASP.NET application.

它将用于发送排队的电子邮件.

It will be used to send queued up emails.

将quartz.net作为Windows服务与嵌入式系统运行的优缺点是什么.

What are the pros and cons of running quartz.net as windows service vs embedded.

我主要关心的是嵌入式模式下的Quartz.NET如何处理IIS中可变数量的工作进程.

My main concern is how Quartz.NET in embedded mode handles variable number of worker processes in IIS.

推荐答案

在决定是否应运行嵌入式程序时,可以考虑以下几点:

Here are some things to you can consider while you decide whether you should run embedded or not:

  1. 如果仅在托管应用程序中创建作业,则运行嵌入式程序.否则,请作为服务运行.

  1. If you are going to be creating jobs ONLY from within the hosting application, then run embedded. Otherwise, run as a service.

如果您的工作可能需要与Web应用程序具有的权限不同的权限,请作为服务运行.

If your jobs might need permissions that are different from the permissions that the web app has, run as a service.

如果您的作业是长时间运行的作业,或者使用大量内存的作业,请作为服务运行.

If your jobs are long running jobs, or jobs that use a lot memory, run as a service.

如果出于性能,可伸缩性或容错性的考虑,需要在群集环境中运行作业,请作为服务运行.

If you need to run your jobs in a clustered environment for either performance, scalability or fault tolerance, run as a service.

从上面的项目中,您可以得出我的偏好是将其作为服务运行.这是因为如果您要麻烦设置作业计划程序,则意味着您有需要按计划运行的作业或长时间运行的作业.通常,服务是此类工作的更好选择.

From the items above you can deduce that my preference is to run it as a service. This is because if you are going to go through the trouble of setting up a job scheduler, this means that you have jobs that need to run on a schedule, or long running jobs. A service is usually the better choice for this type of work.

这篇关于嵌入或作为Windows服务运行Quartz.NET的利与弊的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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