Represents a durable task that can be executed with automatic retry, timeout and failure handling capabilities.
Tasks are the fundamental unit of work in the durable execution system. They encapsulate business logic that needs to run reliably despite failures.
const emailTask: Task<{to: string, subject: string}, {messageId: string}> = { id: 'sendEmail', retryOptions: { maxAttempts: 3, baseDelayMs: 1000 }, sleepMsBeforeRun: 0, timeoutMs: 30000} Copy
const emailTask: Task<{to: string, subject: string}, {messageId: string}> = { id: 'sendEmail', retryOptions: { maxAttempts: 3, baseDelayMs: 1000 }, sleepMsBeforeRun: 0, timeoutMs: 30000}
See the task examples for more patterns and use cases.
Readonly
Represents a durable task that can be executed with automatic retry, timeout and failure handling capabilities.
Tasks are the fundamental unit of work in the durable execution system. They encapsulate business logic that needs to run reliably despite failures.
Key Properties
Example
See the task examples for more patterns and use cases.