Skip to main content

Background jobs (administration)

Reminders, approval escalations, dunning, recurring documents, the nightly accounting agents, exchange rates and the rest run on their own, on a worker nobody sees. Settings → Background jobs shows each of them and whether background work is running at all.

The page​

One row per scheduled job:

ColumnWhat it says
JobThe job's name. Hover for what it does.
ScheduleEvery hour, or Daily at 06:00 in your company's timezone.
StatusWorked, Failed, Retrying, Not run yet, or App off when the app it belongs to is switched off.
Last runWhen the last attempt finished.
DoneWhat the last run did: reminders sent, documents raised, rows touched.
TookHow long the last run took.
Last errorWhy the last run failed. Cleared by the next success.
Next runWhen the schedule runs it next, or when a failed job is retried.

Failed jobs are listed first.

Above the list, a green or red panel says whether the worker (the process that runs queued work) and this company's scheduler have checked in lately.

Under it, an amber panel, Follow-on work is running behind, appears when the oldest piece of follow-on work has waited more than five minutes: the things one action sets off elsewhere, such as re-confirming held orders after a customer is approved, sign-offs appearing, or the storefront's search catching up. It says how many are waiting and for how long, and how many of those come from people's own actions rather than an import. On import day an import's own follow-on work waits behind everything a person did, by design, so a large figure with few from people's actions is an import being worked through; many from people's actions waiting for minutes means the event relay needs looking at by whoever runs your installation. Nothing waiting is ever lost.

Run now​

An Admin (background_job.run) can run any job straight away with Run now. It runs exactly as its schedule would, is recorded on the page, and is written to the audit log (background_job.run_now) with your name and the reason you give. The next scheduled run still happens.

A missed hour is caught up​

A daily job runs at its hour in your company's timezone. If the worker was not running at that hour — a restart, a deploy, a machine asleep — the job runs on the first hourly beat after it, the same day, and still only once that day. Next run says so: an overdue job shows the next beat.

Retries​

A job that fails is tried again on its own: an hour later, then two hours, then four. After four attempts in a day it waits for its next scheduled day, so one broken job does not fill the log. Fix the cause named in Last error, then use Run now.

The "background work isn't running" banner​

An Admin sees a banner above every screen when:

  • the worker has not checked in for more than ten minutes, or
  • this company's scheduler has not run for more than two hours.

It says which, and how long: has never run for a clock that has never ticked, has not run for 5 hours for one that stopped. When jobs have failed and are no longer being retried it says how many (3 jobs are failing), even while everything else is running.

It links here. It can be dismissed for the browser session. Until the worker is back, nothing scheduled happens: no reminders, no escalations, no dunning and no nightly agents.

Who sees what​

PermissionGiven toAllows
background_job.readAdmin, ManagerThe page and the health panel.
background_job.runAdminRun now, and the banner.
background_job.read_lagAdmin, Manager, Accounting, SalesHow far behind follow-on work is (GET /background-jobs/lag) and the running behind banner. Counts only: no jobs, errors or Run now.

Settings​

None. The retry backoff (one hour, doubling, at most four attempts a day) and the staleness limits (ten minutes for the worker, two hours for the scheduler) are fixed by the product.