Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JobExecutionContext ScheduledFireTimeUtc Wrong so Misfire Detection Also Not Working #375

Open
KristjanLaane opened this issue Jun 3, 2016 · 0 comments

Comments

@KristjanLaane
Copy link

Hi again!

I found another issue in production that is rather impactful but was hard to discover, which stems from ScheduledFireTimeUtc being provided as UTC now, when it should have been earlier in the past due to a misfire e.g. because the device was in sleep during the scheduled fire time or when the system clock is pushed into the future. As a consequence the code wrongly never sees any misfires right now, because misfires are detected based on ScheduledFireTimeUtc.

I have made a pull request with the test TestScheduledFireTimeUtc that reproduces this problem. Note that it is a semi-manual test requiring you to manually either push the operating system clock forward or put the device to sleep at the right time, in order to cause a misfire.

As a start for the detective work of why ScheduledFireTimeUtc is wrong, it looks like it is set from RAMJobStore as trigger.GetPreviousFireTimeUtc(). This may mean that PreviousFireTimeUtc is not working correctly as well, or it may mean that ScheduledFireTimeUtc should not be set as trigger.GetPreviousFireTimeUtc() in some circumstances, not sure? The other place that ScheduledFireTimeUtc is set is in the AdoJobStore namespace.

Thanks for your expert work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant