I use JobChainingJobListener to connect several Jobs in Scheduler and then start first job.
So I add first Job with trigger like
scheduler.ScheduleJob(firstJob, SimpleTrigger);
and all other jobs I add like
jobListener.AddJobChainLink(previousJob.Key, currentJob.Key);
scheduler.AddJob(currentJob, true);
It works fine, after JobWasExecuted in jobListener jobs fire one by one with a chain.
Now I want to use RefireImmediately in my jobs like
catch (Exception ex)
{
_logger.Error(ExecuteThrownExceptionMessage, nameof(context.JobDetail.JobType), ex.Message);
var exc = new JobExecutionException(ex)
{
RefireImmediately = true
};
throw exc;
}
I made environment condition so my first job fails and reFires several times.
After some tries Execute works properly and JobWasExecuted in jobListener starts.
But when its time to fire next job in the chain we get "The job referenced by the trigger does not exist".
In RAMJobStore.cs
if (RetrieveJobInternal(newTrigger.JobKey) == null)
{
throw new JobPersistenceException("The job (" + newTrigger.JobKey +
") referenced by the trigger does not exist.");
}
I do not quite understand how RefireImmediately works and why it has problem with the chaining next job.
I use JobChainingJobListener to connect several Jobs in Scheduler and then start first job.
So I add first Job with trigger like
scheduler.ScheduleJob(firstJob, SimpleTrigger);and all other jobs I add like
It works fine, after JobWasExecuted in jobListener jobs fire one by one with a chain.
Now I want to use RefireImmediately in my jobs like
I made environment condition so my first job fails and reFires several times.
After some tries Execute works properly and JobWasExecuted in jobListener starts.
But when its time to fire next job in the chain we get "The job referenced by the trigger does not exist".
In RAMJobStore.cs
I do not quite understand how RefireImmediately works and why it has problem with the chaining next job.