2

I have a job that is scheduled to run every 30 seconds with a Quartz Crontrigger. The schedule is thus "0/30 * * ? * MON-FRI". It has no problem running.

However, I want to pause the job for one minute. So I call scheduler.PauseAll();, which is supposed to pause all triggers in the scheduler. I then have the thread sleep for one minute and then call scheduler.ResumeAll();. So my code looks something like this:

scheduler.PauseAll();
System.Threading.Thread.Sleep(60000);
scheduler.ResumeAll();

The trigger pauses for the appropriate time, but when it resumes, the job will run twice. I have the jobs set with the misfire handling .WithMisfireHandlingInstructionDoNothing(), so I don't understand why the job executes twice in this case. I read this question, but the OP there paused the job instead of the triggers, so I didn't find it helpful.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.