Hangfire next execution set in the past

recurring
Tags: #<Tag:0x00007f499f6e5268>

#1

Hello,

Over the last week, of 1174 recurring jobs, 585 jobs decided not to run. Their next execution all say some variable number of days in the past.
I ran this query
select top 1000 [key], convert(datetimeoffset, value) at time zone ‘Pacific Standard Time’ from hangfire.hash
where field = ‘NextExecution’
and convert(datetimeoffset, value) <= sysdatetimeoffset()

And identified the 585. I’m not sure what happened, everything was fine for over a year. Last time it was related to the time change, but I’m fairly sure that wasn’t what happened this time as its been over a month (though its possible some failed and more and more began failing.

Here is an example

(upload://1M4aS876GhwwiLsnvPmimQIV5sn.png)
This has been running great since 2017, and hundreds of other tasks are running just fine.

What is the best way to fix these jobs purely via SQL? (code would be a poor way to fix this as there are so many different areas of code that created these jobs that it would be difficult to recreate without doing it by hand)


#2

hangfire

There is some sort of spam protection blocking me from editing my original post to fix the not-showing image, it just says my fixed post is too similar to the last thing I posted so here you go, the example I reference above.


#3

I’m in a bad place, so I have no choice but to continue trying things, here was something interesting.

I went to the dashboard and triggered a job. It ran successfully, but it still says the NextExecution is a day a ago. I don’t know if normally, the job should update the column when manually triggered, probably not since I’d expect the CRON to continue being respected, but I still had hope that it might resync the table in some way.

Thanks anyone who can tell me what I should do next.


#4

Crisis averted, the act of upgrading to the latest stable version kicked off the jobs again. Whew.


#5

Hi Richard, what version did you have? And what did you upgrade to?