Quartz.net Job unhandled exception behaviour

2019-08-21 12:38发布

问题:

I am implementing quartz.net scheduler to my project, and have some questions about the workings of this library:

  1. What happens if one job raises an exception without a catch block (unhandled exception)? Would this cause the process to terminate and AppDomain Unloading? Would other jobs suffer?
  2. Does Quartz.net lib try to restart jobs that raised unhandled exceptions? Or should I implement it manually in my project?

Thanks.

回答1:

From what I can determine being a user of Quartz.net myself.

  1. If your job (or quartz itself) raises an unhandled exception like all .net2 or later programs it will take our your app domain. You could try using AppDomain.UnhandledException handler.
  2. I think by default RequestRecovery is true but you can set this to false when you schedule the job.