nextcloud / nextcloud/server

[RFC] Admin-tooling / Background job improvements

Open
#52,877 6 comments 6 reactions 1 assignee View on GitHub

@Altahrim is already working on this.

Since Apr 1, 2026.

  • #59934 by @Altahrim — merged
  • #59965 by @Altahrim — merged
  • #60022 by @backportbot — merged
❄️ 2026-Winter 0. Needs triage enhancement
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

The problem

The current background job system isn't sufficient for many uses, for a developer it isn't possible to use it for anything that needs to happen as soon as possible (e.g. sending call notifications) or something that needs to happen at a specfic time (e.g. 6:00) which leads to various apps implementing their own workarounds.

For sysadmins the system is hard to get insight into, QueuedJobs leave no trace the moment they are done, it's hard to get insight into which jobs are using up resources and interpreting job state is difficult.

Requirements

Below is a list of desired improvements to the background job system, both from the developer perspective that wants to run their code in the background and from a sysadmin/support perspective that wants to get insight into the system

Developer requirements

  • Run a job "asap"
  • Run a job at a specific time/date
  • Mark a job as retryable, with optional delay

Sysadmin requirements

  • Better ui/command for listing jobs
    • show difference between desired run time/date and actual run time/date
    • See QueuedJobs that have finished, possibly leave them in the db for a while, marked as complete
      • Or move to a new table, which would also allow to have a list of old runs from repeating background jobs
    • Mark failed jobs
    • Have mapping between php processes and jobs
    • See which jobs are currently running
  • Metrics/monitoring
    • total time (memory, io?) grouped by job class
    • delay between desired run time/date and actual, both for specific time and "asap" jobs

Sollutions?

Possible implementation ideas

Related: https://github.com/nextcloud/server/issues/52629 https://github.com/nextcloud/server/pull/52055

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.