feat(scheduler): add a countdown to the next scheduler run - #379
Open
renada-jacob wants to merge 1 commit into
Open
feat(scheduler): add a countdown to the next scheduler run#379renada-jacob wants to merge 1 commit into
renada-jacob wants to merge 1 commit into
Conversation
Scheduled Time renders as relative time, so a task whose time has passed reads "3 minutes ago" while its state is still Planned. That reads as overdue when the task is only waiting for the next orchestrator pass. Adds a tile above the Scheduled Tasks table showing the time remaining until the next run, the time it is due, how many of the listed tasks that run will pick up, and how many are already being worked on. The cadence is derived client-side from the fixed Start-UserTasksOrchestrator cron (0 */15 * * * *). Every IANA UTC offset is a whole multiple of 15 minutes, so those boundaries land on the same instants in the browser's local clock. The counts subscribe to the query cache the table already populates, so they cost no extra request and follow the Show System Jobs toggle. The two counts are reported separately because they mean different things. Once an orchestrator claims a task it leaves Planned for Pending, so it stops being due; counting only what is due left a claimed task showing alongside a bare "no tasks due", which reads as though nothing is happening.
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.
The scheduler page shows scheduled tasks in relative time, a task where the scheduled time has passed for example shows "3 minutes ago" with the state of "Planned" which to an unexperienced CIPP user reads as overdue or a problem with CIPP - when in reality it missed the last orchestrator run by a small margin.. I know this causes no end of confusion for MSPs and even myself at times..
This PR aims to address these issues by adding a tile above the Scheduled Tasks table showing the following: