Skip to content

[QUESTION] Reschedule without removing initial task #118

@Writtscher

Description

@Writtscher

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions