Quartz.net Job unhandled exception behaviour

邮差的信 提交于 2019-12-13 04:36:55

问题


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.


来源:https://stackoverflow.com/questions/11343743/quartz-net-job-unhandled-exception-behaviour

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!