@@ -76,10 +76,12 @@ triggered::
7676 background:cron use cron to run background jobs
7777 background:webcron use webcron to run background jobs
7878 background-job
79- background-job:delete remove a background job from the database
80- background-job:execute execute a single background job manually
81- background-job:list list background jobs
82- background-job:worker run a background job worker
79+ background-job:delete Remove a background job from database
80+ background-job:execute Execute a single background job manually
81+ background-job:history Show past jobs
82+ background-job:list List background jobs
83+ background-job:running Show currently running jobs
84+ background-job:worker Run a background job worker
8385
8486background\: cron
8587"""""""""""""""""
@@ -127,6 +129,26 @@ it may be skipped; use ``--force-execute`` to run it regardless::
127129
128130 sudo -E -u www-data php occ background-job:execute --force-execute 42
129131
132+ background-job\: history
133+ """""""""""""""""""""""
134+
135+ Show job history with their duration and peak memory usage.
136+
137+ sudo -E -u www-data php occ background-job:history -l 5
138+ +-------------------+-----------+-------------------------------------------+---------------------+-----------+---------+-----------+--------------+
139+ | Run ID | Status | Class | Started at | Server ID | PID | Duration | Memory usage |
140+ +-------------------+-----------+-------------------------------------------+---------------------+-----------+---------+-----------+--------------+
141+ | 98109593040965632 | Succeeded | OC\C ommand\C ommandJob | 2026-06-22 09:15:19 | 30 | 3847229 | 284 ms | 251.6 MB |
142+ | 98109592927719424 | Succeeded | OC\F ilesMetadata\J ob\U pdateSingleMetadata | 2026-06-22 09:15:19 | 30 | 3847229 | 16 ms | 222 MB |
143+ | 98109592852221952 | Succeeded | OC\F ilesMetadata\J ob\U pdateSingleMetadata | 2026-06-22 09:15:19 | 30 | 3847229 | 8 ms | 221.4 MB |
144+ | 98109588267847680 | Succeeded | OC\C ommand\C ommandJob | 2026-06-22 09:15:18 | 30 | 3847229 | 909 ms | 293 MB |
145+ | 97985889682313216 | Crashed | OCA\T ext\C ron\C leanup | 2026-06-22 01:15:17 | 30 | 3733554 | 594627 ms | 0 B |
146+ +-------------------+-----------+-------------------------------------------+---------------------+-----------+---------+-----------+--------------+
147+
148+ Use ``-l ``/``--limit `` to control how many jobs are shown (default: 200), one or multiple
149+ ``-c ``/``--class `` to filter by job class, and one or multiple ``-s ``/``--status `` to
150+ filter by status (0: running, 1: succeeded, 2: failed, 3: crashed).
151+
130152background-job\: list
131153"""""""""""""""""""""
132154
@@ -145,6 +167,20 @@ Use ``-c`` / ``--class`` to filter by job class, ``-l`` / ``--limit`` to
145167control how many jobs are shown (default: 500), and ``-o `` / ``--offset `` to
146168page through results.
147169
170+ background-job\: running
171+ """""""""""""""""""""""
172+
173+ List all currently running jobs::
174+
175+ sudo -E -u www-data php occ background-job:running
176+ +-------------------+-----------------------+---------------------+-----------+---------+---------------+
177+ | Run ID | Class | Started at | Server ID | PID | Running since |
178+ +-------------------+-----------------------+---------------------+-----------+---------+---------------+
179+ | 98108257692012544 | OC\Command\CommandJob | 2026-06-22 09:10:08 | 30 | 3845056 | 1 seconds |
180+ +-------------------+-----------------------+---------------------+-----------+---------+---------------+
181+
182+ Use ``-l `` / ``--limit `` to limit the number of job shown (default: 200).
183+
148184background-job\: worker
149185"""""""""""""""""""""""
150186
0 commit comments