> For the complete documentation index, see [llms.txt](https://docs.umbraco.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.umbraco.com/umbraco-cms/17.latest/develop-with-umbraco/configuration/distributedjobssettings.md).

# Distributed Jobs Settings

The distributed jobs settings allow you to configure how Umbraco handles distributed background jobs in a load-balanced environment.

## Configuration

```json
"Umbraco": {
  "CMS": {
    "DistributedJobs": {
      "Period": "00:00:05",
      "Delay": "00:01:00",
      "MaximumExecutionTime": "00:05:00"
    }
  }
}
```

## Settings

### Period

**Default:** `00:00:05` (5 seconds)

Specifies how frequently each server checks for distributed background jobs that need to be run.

A shorter period means jobs are picked up more quickly, but increases the frequency of database queries. A longer period reduces overhead but may introduce delays in job execution.

### Delay

**Default:** `00:01:00` (1 minute)

Specifies how long the server should wait after initial startup before beginning to check for and run distributed background jobs. This startup delay ensures that the application is fully initialized and stable before participating in distributed job processing.

### MaximumExecutionTime

**Default:** `00:05:00` (5 minutes)

Adds a grace period on top of the job's own `Period` before a running job is considered stale.

A job that is marked as running in the database is normally skipped by other servers, which prevents duplicate execution. A job becomes eligible for recovery only when more than `Period + MaximumExecutionTime` has elapsed since `LastAttemptedRun`. The `Period` here is the job's own `Period` property — not the polling `Period` defined above.

For example, a job with a 20-minute `Period` and the default 5-minute `MaximumExecutionTime` is recoverable 25 minutes after the last attempted start.

`MaximumExecutionTime` only applies when a job's `finally` block never runs. For example, when the server crashes or is forcibly killed mid-job. Upon graceful shutdown, if the job observes the cancellation token, the host clears the running flag and stamps `LastRun` during cleanup. The job is then eligible again on its normal cadence — `Period` after the cancellation moment — and `MaximumExecutionTime` is not used.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.umbraco.com/umbraco-cms/17.latest/develop-with-umbraco/configuration/distributedjobssettings.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
