cancel
Showing results for 
Search instead for 
Did you mean: 

Mail Task and unavailable mail server

arkadi
Champ in-the-making
Champ in-the-making
We have a User task with a Timer boundary event attached to it to cancel the task and proceed to Mail task to send notification email. In case the mail server is unavailable, or greylists the message, the delivery fails after three attempts, I believe. After that the user task seems to be stuck indefinitely. Is there a guarantee the timer will fire again, maybe sometimes later when some other timer expires (which is fine for our purposes)? Or…?
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
Timer (and all jobs) have a default retry-count of 3. When this is done, and 3 times failes, the timer won't be fired again (to prevent jobexecutor being flooded with failing jobs all the time, making it slow).

You can, however, query for jobs that have no retries left (using ManagementService and JobQuery) and check what exception occured. Based on that, you can decide to run them again (ManagementService.executeJob). This you can do for example, in a quartz job…