This is my quartz configuration:
<quartz> <add key="quartz.scheduler.instanceName" value="EmailScheduler" /> <add key="quartz.threadPool.type" value="Quartz.Simpl.SimpleThreadPool, Quartz" /> <add key="quartz.threadPool.threadCount" value="10" /> <add key="quartz.threadPool.threadPriority" value="Normal" /> <add key="quartz.jobStore.misfireThreshold" value="60000" /> <add key="quartz.jobStore.type" value="Quartz.Impl.AdoJobStore.JobStoreTX, Quartz" /> <add key="quartz.jobStore.driverDelegateType" value="Quartz.Impl.AdoJobStore.StdAdoDelegate, Quartz" /> <add key="quartz.jobStore.dataSource" value="default" /> <add key="quartz.jobStore.lockHandler.type" value="Quartz.Impl.AdoJobStore.UpdateLockRowSemaphore, Quartz" /> <add key="quartz.dataSource.default.provider" value="SqlServer-20" /> <add key="quartz.dataSource.default.connectionString" value="data source= ......" /> <add key="quartz.jobStore.tablePrefix" value="QRTZ_" /> </quartz>
here is my IInterruptableJob :
public class JobC : Quartz.IInterruptableJob { public void Interrupt() { Console.WriteLine("Job Interrupt() called at " + DateTime.Now); } public void Execute(IJobExecutionContext context) {
Here is my work and trigger:
var job = JobBuilder.Create<JobC>().WithIdentity(new JobKey("JobC")).RequestRecovery(true).Build(); var trigger = TriggerBuilder.Create() .WithSimpleSchedule(x => x .RepeatForever() .WithIntervalInSeconds(2)
After calling scheduler.PauseAll() all tasks are suspended and after calling scheduler.ResumeAll() all the missed lights, it works! but I want to ignore them and just continue.
Thanks in advance.
source share