Merged
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.
devblackops
reviewed
Aug 8, 2018
|
|
||
| [void]ResetTimer() { | ||
| $this.Stopwatch.Reset() | ||
| $this.Stopwatch.Start() |
Member
There was a problem hiding this comment.
Looks like the stopwatch is not longer need. Can you remove it from the class?
Contributor
Author
There was a problem hiding this comment.
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!
Member
|
LGTM. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: