Repository navigation
Conversation
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Mario Alfonso Pym Mejía <pymm@hitss.com>
MarioPym
requested review from
Altahrim,
provokateurin,
salmart-dev and
sorbaugh
and removed request for
a team
October 26, 2026 15:13
This branch has not been deployed
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.
Summary
On large instances, it is sometimes necessary to prevent a specific background job class from executing (for example, if a job consumes too many resources or is already handled by an external process) without disabling the app that registered it. Currently, the only workaround is deleting the job from
oc_jobs, which causes the app to re-register it upon the next upgrade or app activation.This change introduces the
excluded_jobssystem configuration key, which accepts a list of job class names.JobList::getNext()skips any jobs matching these classes, preventing them from being picked up by cron, webcron, AJAX, orocc background-job:worker. The jobs remain registered in the database and can still be triggered manually viaocc background-job:execute. Leading backslashes in class names are supported, and the new key has been documented inconfig.sample.php.How to test
occ config:system:set excluded_jobs 0 --value='OCA\Files\BackgroundJob\DeleteOrphanedItems'last_runandlast_checkedto 0 inoc_jobs) and runphp cron.php.occ config:system:delete excluded_jobsand run cron again: the job runs.Unit tests:
tests/lib/BackgroundJob/JobListTest.php.Checklist
3. to review, feature component)stable32)AI (if applicable)