-1

I have a following code where i have started a quartz scheduler

internal static IScheduler MyQuartzScheduler = null;
     private static async void StartProcessing()
            {
                try
                {
                    Logger.Info("Starting Quartz");
                    StdSchedulerFactory factory = new StdSchedulerFactory();
                    MyQuartzScheduler = await factory.GetScheduler();
                    await MyQuartzScheduler.Start();
                    QuartzScedulerMessage = String.Format("Quart Scheduler Started on {0}", DateTime.Now);
                }
                catch (Exception ex)
                {
                    QuartzScedulerMessage = ex.Message;
                    Logger.Fatal(ex.Message, ex);
                }
            }

My scheduler is started and working fine. I were just curious if for any reason (like i have ado job store in my sql and db connectivity break) if scheduler crashes .Any how i can get scheduler ending or crashing event?

Kamran Shahid
  • 3,954
  • 5
  • 48
  • 93

1 Answers1

2

I think you should try Scheduler Listener in Quartz.NET here is the documentation ;

Scheduler Listener

MFARKAN
  • 226
  • 2
  • 3
  • 12
  • Thanks Murat Fatih Arkan. I wonder who have down-voted the question. Recent trend of people are more interesting in down voting rather then answering. At least there should be reason for down voting so that person can improve his question – Kamran Shahid May 21 '18 at 07:35
  • 2
    you're welcome :) We're using this listener same reason with you , because we have 2 app server and clustering mechanism if scheduler down we will down too :) good day... – MFARKAN May 21 '18 at 07:53