TaskManager
Configures task execution settings including retry strategies.
This object can be configured from the WebUI under Settings › Task Manager
Fields
maxAttempts
Type:
UnsignedInt· default:3· min: 1Maximum number of attempts for retrying a task
strategy
Type:
TaskRetryStrategy· requiredStrategy to use for retrying failed tasks
totalDeadline
Type:
Duration· default:"6h"Total deadline for retrying a task before it is marked as failed
JMAP API
The TaskManager singleton is available via the urn:stalwart:jmap capability.
x:TaskManager/get
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.
curl -X POST https://mail.example.com/api \
-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"
]
}'
x:TaskManager/set
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.
curl -X POST https://mail.example.com/api \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"methodCalls": [
[
"x:TaskManager/set",
{
"update": {
"singleton": {
"maxAttempts": 3
}
}
},
"c1"
]
],
"using": [
"urn:ietf:params:jmap:core",
"urn:stalwart:jmap"
]
}'
CLI
stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.
Fetch
stalwart-cli get task-manager
Update
stalwart-cli update task-manager --field description='Updated'
Nested types
TaskRetryStrategy
Retry strategy for failed tasks.
ExponentialBackoff: Exponential backoff. Carries the fields ofTaskRetryStrategyBackoff.FixedDelay: Fixed delay. Carries the fields ofTaskRetryStrategyFixed.
TaskRetryStrategyBackoff
Exponential backoff retry strategy settings.
factor
Type:
Float· default:2.0· min: 1Backoff factor for calculating retry delays
initialDelay
Type:
Duration· default:"1m"Initial delay before retrying a failed task
maxDelay
Type:
Duration· default:"30m"Maximum delay between retry attempts
jitter
Type:
Boolean· default:trueWhether to apply jitter to the retry delay to avoid thundering herd problem
TaskRetryStrategyFixed
Fixed delay retry strategy settings.
delay
Type:
Duration· default:"5m"Fixed delay before retrying a failed task