Refire quartz.net trigger after 15 minutes if job fails with exception

后端 未结 4 1478
心在旅途
心在旅途 2020-12-29 10:44

I have searched for an answer on how to retrigger a job after a ceratin amount of time, if the job throws an exception. I cannot see any simple way of doing this.

if

4条回答
  •  余生分开走
    2020-12-29 11:27

    I think that the right answer is to use JobListener to retry a job as described here: http://thecodesaysitall.blogspot.cz/2012/03/quartz-candy-part-1.html.

    You separate retry logic from Job itself in this solution, so it can be reused.

    If you implement retry logic in job as suggested in another replies here, it must be implemented again in every job.

    Edit: According to the Ramanpreet Singh note better solution can be found here: https://blog.harveydelaney.com/quartz-job-exception-retrying/

提交回复
热议问题