Hangfire next execution set in the past

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)

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.

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.

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

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

Hello, i have been facing this issue for the past week. All of the Recurring jobs in Hangfire got Next Execution date a past date. I have noticed that if i trigger any job, it will be executed and the Next Execution date is set properly. But when the time comes up it does not executed at all and the Next Execution date is set to past date again. The only solution i managed to find it to delete them all from the database, DELETE FROM [Hangfire].[Set] and DELETE FROM [Hangfire].[Hash] and re-create them.

Could you please advise, how to avoid this kind of issues?
Thank you in Advance