tflidd
January 29, 2026, 9:38am
2
I didn’t find anything in the documentation. However, you can track down and find a few things on github, here the feature was introduced:
https://github.com/nextcloud/server/pull/30359
Feature request for a runner:
opened 09:23AM - 05 May 25 UTC
enhancement
0. Needs triage
### How to use GitHub
* Please use the 👍 [reaction](https://blog.github.com/201… 6-03-10-add-reactions-to-pull-requests-issues-and-comments/) to show that you are interested into the same feature.
* Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
* Subscribe to receive notifications on status change and new comments.
**Is your feature request related to a problem? Please describe.**
Currently, some apps require the setup of a fast background job worker using `occ background-job:worker`. Some apps require more than one worker of the same job, even. Setting these up e.g. with systemd is cumbersome and repetitive. Additionally for nextcloud AIO, it would be beneficial to have a generic way to run these without hard coding jobs for all possible apps in the AIO code.
**Describe the solution you'd like**
We could have a new php script next to cron.php and occ or just another occ command that
* figures out which jobs to run
* runs the necessary background workers as sub processes
* keeps track of them and restarts them when they fail or exit
* Passes the stdout of the workers through to its own stdout
Background services could be set via a a php file, or a json file. A service could be either a `background-job:worker` `"worker"` or a `"dedicated-cron"` `cron.php` runner, with a set list of jobs. This would cater to both `QueuedJob`s and `TimedJob`s (the latter cannot be run by the bg-job worker).
```json
{
"services": {
"TaskProcessing 1": {
"type": "worker",
"jobs": ["OC\\TaskProcessing\\SynchronousBackgroundJob"],
},
"TaskProcessing 2": {
"type": "worker",
"jobs": ["OC\\TaskProcessing\\SynchronousBackgroundJob"],
},
"WebhookListeners": {
"type": "worker",
"jobs": ["OCA\\WebhookListeners\\BackgroundJobs\\WebhookCall"],
},
"ContextChat": {
"type": "dedicated-cron"
"jobs": ["OCA\\ContextChat\\BackgroundJobs\\CrawlJob", "OCA\\ContextChat\\BackgroundJobs\\IndexerJob"],
}
}
}
```
Services would be started only if the respective job classes are loadable in the main php process.
**Describe alternatives you've considered**
We could also leave out the dedicated cron feature, which would make the whole thing less powerful but still useful.
**Additional context**
-
On the forum, just an unanswered help request:
The Basics
Nextcloud Server version (e.g., 29.x.x):
31.0.2
Operating system and version (e.g., Ubuntu 24.04):
TrueNAS-SCALE Electric Eel 24.10
Web server and version (e.g, Apache 2.4.25):
NA
Reverse proxy and version _(e.g. nginx 1.27.2)
NA
PHP version (e.g, 8.3):
8.3.19
Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
TrueNAS App/Docker
Are you using CloudfIare, mod_security, or similar? (Yes / No)
No
Summary of the issue you are facing:
I have configured Nex…
If you have broken background jobs, you should also find out which ones are failing and repair them (or report a bug). The oc_jobs table should help you which jobs run when for the last time and how long it took, and of course when it is running the logfiles (and you might have some errors when you call the jobs directly from command line).
1 Like