How to set a Schedule to Start Timeout in TypeScript
When you call proxyActivities
in a Workflow Function, you can set a range of ActivityOptions
.
Either scheduleToCloseTimeout
or scheduleToStartTimeout
must be set.
Type: time.Duration Default: ∞ (infinity – no limit)
In this example, you can set the scheduleToStartTimeout
to 60 seconds.
// Sample of typical options you can set
const { greet } = proxyActivities<typeof activities>({
scheduleToCloseTimeout: '5m',
scheduleToStartTimeout: '60s',
retry: {
// default retry policy if not specified
initialInterval: '1s',
backoffCoefficient: 2,
maximumAttempts: Infinity,
maximumInterval: 100 * initialInterval,
nonRetryableErrorTypes: [],
},
});