Jobs being auto canceled

Hi,

I was just wondering what might trigger an automatic cancelation of a recurring job. Over the weekend a recurring job I was running seems to have gotten stuck in a state where it was being canceled but not through user intervention. It was a minutely job and the Last Execution time would always just show “Canceled a few seconds ago”, but it was still getting queued up and then canceled again.

I’ve fixed the issue by simply deleting the recurring job and rescheduling it, but I was wondering if there was something I should look for that might cause this to happen in the future. Thanks

Hi: Were you able to figure this out? We are having the same issue.

Thanks,
Jyotsna

I am having the same problem and have not been able to find a cause either.
I have found the following log entries in my Hangfire log:

"2020-05-20 08:30:02.4200";"INFO";"Job that is based on method `MyRecurringJobMethod` has been created with id ``  with parameters  RecurringJobId: MyRecurringJobId,Time: 1589956202,CurrentCulture: da-DK,CurrentUICulture: en-US";"LogEverythingAttribute.OnCreated => Logger.Info => Logger.Log";""
"2020-05-20 08:30:02.4200";"DEBUG";"Recurring job 'MyRecurringJobId' execution at '20-05-2020 06:30:00' has been canceled.";"RecurringJobScheduler.ScheduleRecurringJob => LogExtensions.Debug => NLogLogger.Log";""

The second log entry is written here:


Which suggest that the job is not created at all because _factory.TriggerRecurringJob(...) returns null.

Looking through the code a little more. I think the error is happening here:


But I can see that I don’t know enough about Hangfire Filters to make it actually log the exception in that catch block.

I would say that it is completely stupid that it simply returns null instead of re-throwing the exception so the exception message could be shown in the dashboard.