我有一个以下代码,我已经启动了石英调度程序
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);
}
}
我的调度程序已启动并正常运行。我只是好奇,如果出于任何原因(比如我在我的sql和db连接断点中有ado job store)如果调度程序崩溃了。我怎么能让调度程序结束或崩溃事件?