Pros and Cons of running Quartz.NET embedded or as a windows service

前端 未结 2 1626
北荒
北荒 2021-02-01 07:51

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

It will be used to send queued up emails.

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

2条回答
  •  礼貌的吻别
    2021-02-01 08:22

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

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

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

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

    4. 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.

提交回复
热议问题