Dynamically adding and removing jobs for the Quartz.NET Windows service

I am developing a WinForm email application. And for planning campaigns, I decided to use Quartz.NET . I need it to work as a windows service. but I also want the user to be able to add a task (for example, a campaign that should run every day at 8 a.m., which basically works with the .bat file) for the service through the program.

I also save all job schedules to the database, so when you stop / start the OS or the Windows service, it can still read all the jobs that need to be run.

How to add a task to the service while the service is running? Dynamically adding / removing jobs for a service is, of course, very preferable. Stopping the service and reading all jobs again from the database, to be honest, in my last case.

+8
c # job-scheduling windows-services
source share
1 answer

You can install Quartz.Net as a Windows service and configure it to use AdoJobStore .
The WinForm application will be an interface in which you can add, pause and delete tasks and triggers.

You do not need to stop windows services while you are doing this.

You do not need to read your database to find out what is happening in Quartz, but you should use the provided APIs.

I did something similar a long time ago; my quartz.net manager was a web application.

You can read my answer here .

I assume that you do what you are looking for in much the same way.

A link to Quartz.net samples and a free book can be found here and here .

+7
source share

All Articles