I have a task which is scheduled every few minutes.
I want to implement the logic where new task starts where previous successfully executed task left off.
More concretely I use this time intervals to than query the database and so I don't to miss some data between executions.
How this can be achieved ?