HangfireIO / Hangfire

An easy way to perform background job processing in .NET and .NET Core applications. No Windows Service or separate process required
https://www.hangfire.io
Other
9.44k stars 1.71k forks source link

"Next execution" is in the past, and "Last execution" is N/A #2344

Closed yong2khoo-lm closed 10 months ago

yong2khoo-lm commented 10 months ago

After upgrading from schema 7 to schema 9 (1.8.6), when creating a new recurring job, this happens.

"Next execution" is in the past, and "Last execution" is N/A

Did i overlook something? (eg: table update typo, etc)

odinserj commented 10 months ago

Please try upgrading to version 1.8.7, it now displays whether there are time synchronization issues between application host and job storage in the bottom of the page, and let me know if that's the case.

yong2khoo-lm commented 10 months ago

image

Fyi, with v1.8.6, using back the deprecated method will work.

P.S.:

After it works, then re-patching with the non-deprecated code will work again. Not sure why.

yong2khoo-lm commented 10 months ago

for now, since it is working, then let me close first.

odinserj commented 10 months ago

Hey, I'm looking at this problem right now, and it looks really strange that non-deprecated method works differently than the deprecated one. I checked every line of RecurringJob class and found no differences between them. If you'll experience this problem once again, please let me know what AddOrUpdate method overload you are using to look at that method more precisely - unfortunately there are a lot of them due to backward compatibility.

yong2khoo-lm commented 10 months ago

Hey, I'm looking at this problem right now, and it looks really strange that non-deprecated method works differently than the deprecated one. I checked every line of RecurringJob class and found no differences between them. If you'll experience this problem once again, please let me know what AddOrUpdate method overload you are using to look at that method more precisely - unfortunately there are a lot of them due to backward compatibility.

Sure no problem. Thanks~

yong2khoo-lm commented 10 months ago

It turns out, after a test again, it looks like i have to rebuild my application .dll after every database restore. So probably it is not due to the deprecated method or not.

odinserj commented 10 months ago

It turns out, after a test again, it looks like i have to rebuild my application .dll after every database restore.

What do you mean?

yong2khoo-lm commented 10 months ago

It turns out, after a test again, it looks like i have to rebuild my application .dll after every database restore.

What do you mean?

My bad for confusion. Let me elaborate: