I have a Web UI that creates/updates/deletes jobs (e.g. send email, delete files, etc) and specifying when the jobs should be ran (e.g. everyday at noon, last day of each month, etc.). There will be a Windows service created to actually run the jobs. I've been piecing together bits and pieces of info, but there are things that still aren't clear.
My database has a MyJob table that contains a job and its required info (e.g. send email job, sender, receiver, etc.). I assume it will not contain any Quartz job info or Quartz trigger info.
In the Web UI:
- Use Quartz. Reference Quartz NuGet package, create web.config Quartz section (specifically for AdoJobStore), and create a non-executing scheduler somehow?
- Create a job and trigger info. I assume the AdoJobStores contains info for Quartz jobs (name, group, etc.) and triggers (name, group, cron expressions), and that Quartz API should be used to create/update/delete these info. All of this can be done using the previously created non-executing scheduler?
In the Windows service (should this be a console app?):
- Use Quartz.Reference Quartz NuGet package, create web.config Quartz section (specifically for AdoJobStore), and create an executing scheduler somehow?
- Does the executing scheduler automatically knows to load job/trigger info (that was created by the Web UI) and run the jobs? Or do I need to read the job/trigger info and programmatically loop for each, use JobBuilder.Create() to create a job, use TriggerBuilder.Create() to create a trigger, and use the executing scheduler.ScheduleJob() to run each job?
- If I have to manually load, create, and run jobs in #2, I also need to take care of job deletions and updates. What are the recommended steps here?
- Whenever the Web UI creates/updates/deletes jobs, do I need to notify the Windows service or does the Windows service poll the job/trigger tables and automatically updates itself?
It seems like this is a common usage scenarios, but my search haven't produced a cohesive picture. Any help here or links to documentations/tutorials/examples is greatly appreciated.