(Alternative restart cycle) Allow setting a fixed weekday for weekly restarts - #24
Merged
Merged
Conversation
…"restart every x days" as an alternative option
disable fixed day restarts as default.
allow setting a fixed day in the week for weekly restarts instead of …
Helias
reviewed
Jun 2, 2025
Helias
approved these changes
Jun 2, 2025
…ncy and use of common.h
refactor ServerAutoShutdown timing functions for clarity and consiste…
Contributor
|
I think just use a bitmask where 1 to 7 corresponds to 1, 10, 100, 1000, 10000, 100000, and 1000000 respectively. Then, I can just set the bitmask for the days of the week when I want to restart, which is more flexible. |
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.
With this change, the config offers an alternative setting for enabling weekly restarts on the same recurring weekday instead of restarts every x-days.
I made this change for myself since I wanted to have the weekly restarts/shutdowns on the same day for easier maintenance.
The original usage will still be possible if the weekday setting is kept with the default of -1 (disabled)