-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Possible to add a way to schedule maintenance every first Monday, Tuesday, etc...? #3186
Comments
I would not like to add this additional feature. Would |
Thanks for the suggestion. My understanding is that the Is it possible to do that as well in the current version of Uptime Kuma? I am not sure "legacy" refers to this being ready to deprecate in this case. Note also that it is set to |
Setting legacyMode to false is perfectly safe and a permanent feature of croner. The default will always be legacyMode: true, which makes croner work like legacy cron parsers, which is expected behaviour, even though it's not optimal. Confusing - yes! Need to worry - no 😄 |
I think so, it seems to work for second and third $dayOfWeek. First Monday:
I'm not well versed in web-design, but as a user I think a checkbox (that is unchecked by default) next to the cron textbox would make sense: Checking the checkbox would set Regarding the helptext, something similar to the Cloudflare settings page would probably be clear in terms of formatting: The text (in light gray) could say something like:
Instead of the croner issue, it could also link to the current issue. Hope this helps? Let me know if I can provide anything else. |
The checkbox should be easy to be implemented. But the cron description (This message: |
That is tricky indeed. I see two options, both are less than elegent unfortunately:
In the second option there is a bit of redundancy there as it specifies both "between day X and Y of the month" and "Nth day of the week". |
Proper support for nth weekday of month through This will enable patterns such as |
Any progress on this? The data center we use performs scheduled maintenance every third Saturday and Sunday of the month. I would love to use |
The reason why this is not avaliable is that we have not found the time to migrate croner to v7. See Line 92 in cf2d603
This change either needs calling out or a migration: Note Compared to previous versions, there's a change in the way Here is our contribution guide: https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md |
🏷️ Feature Request Type
Other
🔖 Feature description
The maintenance scheduler allows scheduling with cron. While cron on Debian allows one to schedule something on the first Monday (or Tuesday) of a month, the used cron library
croner
does not.However,
croner
does offer a legacy mode that would check the date of month and day of week conditions with anAND
operator instead of the defaultOR
operator.✔️ Solution
By adding a checkmark next to the cron expression that would toggle
croner
legacy mode, you could create a cron expression:Without the legacy box unchecked (as it is now) this would be:
With the legacy box checked:
❓ Alternatives
I have tried different cron expressions listed in this Superuser post. Unfortunately none of them work with the
croner
library.📝 Additional Context
I only have a very rough understanding of JS, but to me it seems that a change would be needed in
/server/model/maintenance.js#L264
. Something like this fake code:and in the UI around
/src/pages/EditMaintenance.vue#L94
.The text was updated successfully, but these errors were encountered: