Stopping a workflow execution
Written by
Updated at April 14, 2025
If you stop a workflow execution, Workflows will first wait for the current active step to complete. Follow this guide to interrupt the step that is currently active: Forcing a workflow to stop.
CLI
API
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameters.
-
See the description of the CLI command to stop a workflow execution:
yc serverless workflow execution stop --help
-
Specify a workflow ID to get a list of workflow executions:
yc serverless workflow execution list --workflow-id <workflow_ID>
Result:
executions: - id: dfq...e78 workflow_id: dfqud9cbc4k5******** status: FINISHED started_at: "2025-03-10T15:54:44.304781814Z" duration: 1.070697344s ... - id: dfq...4d5 workflow_id: dfqud9cbc4k5******** status: FINISHED started_at: "2025-03-10T15:05:19.982768956Z" duration: 0.971907165s
-
Stop a workflow execution:
yc serverless workflow execution stop <workflow_execution_ID>
Result:
execution_id: dfqmeu8ci1ae2tvocsbv-429e9f6f-b506-4c5a-84b2-9abb********
To stop a workflow execution, use the stop REST API method for the Execution resource or the ExecutionService/Stop gRPC API call.