Skip to content

TaskManager

Configures how background tasks are retried after transient failures.

This object can be configured from the WebUI under Settings › Task Manager

Type: TaskRetryStrategy · required

Strategy used to compute the delay before a task that failed with a transient error is retried

Type: UnsignedInt · default: 5 · min: 1

Number of failed attempts after which a task is reported as stalled; stalled tasks keep retrying with the configured strategy

The TaskManager singleton is available via the urn:stalwart:jmap capability.

This is a standard Foo/get method as defined in RFC 8620, Section 5.1.

For singletons, the ids argument should be the literal singleton (or null to return the single instance).

This method requires the sysTaskManagerGet permission.

Terminal window
curl -X POST https://mail.example.com/jmap/ \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:TaskManager/get",
{
"ids": [
"singleton"
]
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

This is a standard Foo/set method as defined in RFC 8620, Section 5.3.

For singletons, only the update argument with id singleton is accepted; create and destroy arguments are rejected.

This method requires the sysTaskManagerUpdate permission.

Terminal window
curl -X POST https://mail.example.com/jmap/ \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:TaskManager/set",
{
"update": {
"singleton": {
"strategy": {
"@type": "ExponentialBackoff"
}
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'

stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.

Terminal window
stalwart-cli get TaskManager
Terminal window
stalwart-cli update TaskManager --field strategy='{"@type":"ExponentialBackoff"}'

Retry strategy for failed tasks.

Exponential backoff retry strategy settings.

Type: Float · default: 2.0 · min: 1

Backoff factor for calculating retry delays

Type: Duration · default: 60000

Initial delay before retrying a failed task

Type: Duration · default: 21600000

Maximum delay between retry attempts

Type: Boolean · default: true

Whether to apply jitter to the retry delay to avoid thundering herd problem

Fixed delay retry strategy settings.

Type: Duration · default: 300000

Fixed delay before retrying a failed task