How to set a Workflow Run Timeout in Go
Create an instance of StartWorkflowOptions
from the go.temporal.io/sdk/client
package, set the WorkflowRunTimeout
field, and pass the instance to the ExecuteWorkflow
call.
- Type:
time.Duration
- Default: Same as
WorkflowExecutionTimeout
workflowOptions := client.StartWorkflowOptions{
WorkflowRunTimeout: time.Hours * 24 * 365 * 10,
// ...
}
workflowRun, err := c.ExecuteWorkflow(context.Background(), workflowOptions, YourWorkflowDefinition)
if err != nil {
// ...
}