Hi all,
I need to have a single job running every N seconds but only if the previous instance of the same job completed its work. Is that possible to achieve?
1- use a trigger than repeats every N seconds, have the job unschedule itself if it "fails" (whatever that means to it).
2- use a single-fire simple trigger to fire the job the first time. have the job schedule itself with a new (single-fire) trigger if it "succeeds".
3- a variation of either #1 or #2 where a JobListener does the work of scheduling/unscheduling the job.
Hi,
thanks for you answer. The problem is slightly different, I don't have to block the next execution if the job fails, but I only need to fire the next execution ONLY if the previous execution completed (I don't care whether it succeed or fails, I just care about running or not).
So what I want to make sure, is not to have to execution at the same time.