-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
Issue85 #90
Issue85 #90
Conversation
IntervalMS was incorrectly being used to calculate the HasElapsed method
Recurring schedules need to trigger the update to the StartAfter date based on IntervalMS
The StartAfter property should contain the correct start time, as the user either just updated it or doesn't want it to change.
This reverts commit 060c17b.
…fter" This reverts commit 0c00db3.
} | ||
|
||
[void]ResetTimer() { | ||
$this.Stopwatch.Reset() | ||
$this.Stopwatch.Start() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the stopwatch is not longer need. Can you remove it from the class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I removed it from the scheduler class. I did a search and the only other areas the stopwatch seems to be referenced were in the actual Bot instance for tracking uptime.
Let me know if you find anything else that requires changing!
LGTM. Thanks! |
Description
Modify the ScheduledMessage class to trigger using StartAfter instead of IntervalMS.
Adjust StartAfter using IntervalMS after each run.
Add Pester tests for ScheduledMessage class.
Related Issue
#85
Motivation and Context
This solves the issue of Scheduled Commands firing off IntervalMS after they were created, instead of triggering at the StartAfter time and then repeating at a frequency of IntervalMS
How Has This Been Tested?
Pester tests. I also have a PoshBot server in my work environment.
Screenshots (if appropriate):
Types of changes
Checklist: