How to get detailed information about all scheduled tasks and triggers in Quartz.NET C #

I need to create an administration page for all scheduled tasks and triggers. How can I get job and trigger details in Quartz.NET? Can I pause / stop or update jobs? Is there any code sample?

+7
source share
2 answers

Here's how you do it using StdSchedulerFactory

ISchedulerFactory schedFact = new StdSchedulerFactory(); foreach (IScheduler scheduler in schedFact.AllSchedulers) { var scheduler1 = scheduler; foreach (var jobDetail in from jobGroupName in scheduler1.JobGroupNames from jobName in scheduler1.GetJobNames(jobGroupName) select scheduler1.GetJobDetail(jobName, jobGroupName)) { //Get props about job from jobDetail } foreach (var triggerDetail in from triggerGroupName in scheduler1.TriggerGroupNames from triggerName in scheduler1.GetTriggerNames(triggerGroupName) select scheduler1.GetTrigger(triggerName, triggerGroupName)) { //Get props about trigger from triggerDetail } } 
+12
source

Here is an open source project that does just that. The project must have all the code you need to create your own, or you can simply use the open source project.

Administration Webpage for Quartz.net

  • Allow registration of existing Quartz.net installations
  • Allow viewing tasks and triggers
  • Allow job scheduling, including editing JobDataMaps
  • Allow viewing calendars
  • Allow viewing trigger time
  • Silverlight Timeline Showing Upcoming Schedules
+10
source

All Articles