Jobs is running and stays that forever but does not do anything
See original GitHub issueHi,
Quartz.Net version 3.0.2
With the following code I’m creating a job in the scheduler
GetJobAndTriggerKey(job, out var jobKey, out var triggerKey);
if (Scheduler.CheckExists(jobKey).Result) return;
IJobDetail schedulerJob;
if (jobDataMap != null)
{
schedulerJob = JobBuilder.Create(job.GetType())
.WithIdentity(jobKey)
.WithDescription(job.Info)
.RequestRecovery(true)
.SetJobData(jobDataMap)
.Build();
}
else
{
schedulerJob = JobBuilder.Create(job.GetType())
.WithIdentity(jobKey)
.WithDescription(job.Info)
.RequestRecovery(true)
.Build();
}
ITrigger schedulerTrigger = (ISimpleTrigger) TriggerBuilder.Create()
.WithIdentity(triggerKey)
.WithDescription(job.Info)
.StartNow()
.Build();
_scheduler.ScheduleJob(schedulerJob, schedulerTrigger);
The jobs gets created but nothing happens, the code that is inside the job is not executed and the jobs stays in the running state forever.
I added extra logging and this is what QuartzNet is saying about that job
[Quartz.Core.QuartzSchedulerThread] - [Debug] Batch acquisition of 0 triggers
[Quartz.Core.JobRunShell] - [Debug] Calling Execute on job SystemJob.0@Stockist pipeline
To me it looks like that the job has no trigger, but if so how did it get in the running state and why does is stay there forever?
Do you have any idea what is going wrong overhere?
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Jobs stay at job queue forever
I am having a 9402 200 model with V3R2M0 and running an application there. In the past two weeks I experienced a problem...
Read more >How Long is Too Long to Stay in the Same Job and 3 Huge ...
Long gone are the days where we finish school and then sign up to work for one company – in the same position...
Read more >Pipeline keeps running forever if job needs other manual job
The pipeline should not stay in running state but show a success / fail state if the manual job is not being triggered....
Read more >What are good jobs for someone who doesn't want to be ...
Musician ; Graphic Design Artist; Professional Freelancer/Gig Worker (See Upwork). Stuck doing the same thing? Not a ...
Read more >Debugging kubernetes pods in Completed status forever ...
This issue got nothing to do with k8s cluster or setup. It's mostly with your Dockerfile. For the pod to be in running...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello looks like i am getting the same issue. I have put logger in all my method to check if it goes inside… i have started the trigger in IIS Preload function that check for the new jobs in my db with status new. i have another scheduler/trigger that schedules the job where i have implemented myJobListener inside which i have the method JobTobeExecuted i have put a logger in that method it goes inside it but never to the Execute part.
if i start the scheduler thats check for my new jobs in db in application_start (global.asax) then it works fine. Note that it was working before maybe v 3.0.1 i have upgraded to v3.0.2 recently but did not revert back to check.
Can you let me know the write way to start the main scheduler that check for new job in my db Thank you !
I solved the issue in my case as well in the job listener method i was using Task.Completed which prevented the execute from happening. I have use Task.FromResult(true); and inside JobExecutionVetoed Method Task.FromResult(false);