feat: Mark systemd timers are preferred method#14718
Open
CarlSchwan wants to merge 1 commit intomasterfrom
Open
feat: Mark systemd timers are preferred method#14718CarlSchwan wants to merge 1 commit intomasterfrom
CarlSchwan wants to merge 1 commit intomasterfrom
Conversation
systemd timers are the most modern way to configure background jobs and is deeply integrated in journalctl and resources limit can also be easily added. And move systemd timers and cron to the top, to hopefully ensure less people use webcron/ajax for background jobs. Signed-off-by: Carl Schwan <carlschwan@kde.org>
Member
ChristophWurst
left a comment
There was a problem hiding this comment.
Good idea!
This would be worth mentioning at https://github.com/nextcloud/documentation/tree/master/admin_manual/release_notes for admins who upgrade.
provokateurin
requested changes
May 4, 2026
| **Use case: Single user instance** | ||
| If systemd is installed on the system, then systemd timer is the preferred way method for executing | ||
| regular tasks. This method enables the execution of scheduled jobs without the | ||
| inherent limitations the Web server might have. |
Member
There was a problem hiding this comment.
Suggested change
| inherent limitations the Web server might have. | |
| inherent limitations the web server might have. |
|
|
||
| [Timer] | ||
| OnBootSec=5min | ||
| OnUnitActiveSec=5min |
Member
There was a problem hiding this comment.
Suggested change
| OnUnitActiveSec=5min | |
| OnActiveSec=5min |
I think we want this, as otherwise a very long running cron would delay the next execution by 5 minutes. If the cron takes a long time, because it has a lot to do, it should run as soon as possible.
| [Install] | ||
| WantedBy=timers.target | ||
|
|
||
| The important parts in the timer-unit are ``OnBootSec`` and ``OnUnitActiveSec``. ``OnBootSec`` will start the timer 5 minutes after boot, otherwise, you would have to start it manually after every boot. ``OnUnitActiveSec`` will set a 5-minute timer after the service-unit was last activated. |
Member
There was a problem hiding this comment.
This would need to be updated too.
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.
systemd timers are the most modern way to configure background jobs and is deeply integrated in journalctl and resources limit can also be easily added.
And move systemd timers and cron to the top, to hopefully ensure less people use webcron/ajax for background jobs.
☑️ Resolves
🖼️ Screenshots
✅ Checklist
codespellor similar and addressed any spelling issues