Web UI creates jobs/triggers, Windows service runs jobs

18 views
Skip to first unread message

Trevor Nguyen

unread,
Feb 4, 2020, 2:26:09 AM2/4/20
to Quartz.NET
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:
  1. Use Quartz. Reference Quartz NuGet package, create web.config Quartz section (specifically for AdoJobStore), and create a non-executing scheduler somehow?
  2. 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?):
  1. Use Quartz.Reference Quartz NuGet package, create web.config Quartz section (specifically for AdoJobStore), and create an executing scheduler somehow?
  2. 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?
  3. 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?
  4. 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.
Reply all
Reply to author
Forward
0 new messages