-
-
Notifications
You must be signed in to change notification settings - Fork 229
Description
Hi. I am trying to find a way to implement a task with max retries. I have checked your examples especially the max retry example but the problem is that in the end the task is stopped (removed). I'd like to avoid this.
So what I'd like to implement:
RecurringTask scheduled (runs every morning at 8 am). If the first run fails the task retries for MAX_RETRIES. If every retry fails go back to default scheduling (next day 8 am. This is pretty easy. The problem is: How do I implement a retry for this run? Because the task error count is at MAX_RETRIES. So I cannot check whether error count < MAX_RETRIES.. I need some kind of run state.
With quartz you would just create for this task another trigger and keep your initial trigger. This trigger retries and removes itself if the task succeeds or fails at MAX_RETRIES..
This is not possible right now. A executionOperations.reset() would be nice.