Overview
Thedbos workflow command group provides tools for managing workflow execution, including listing, inspecting, canceling, resuming, and forking workflows.
dbos workflow list
List workflows for your application with filtering and pagination.Options
Maximum number of workflows to return.
Offset for pagination. Skip this many workflows.
Sort results in descending order (older workflows first).
Filter by authenticated user ID.
Retrieve workflows starting after this timestamp (ISO 8601 format).Example:
2024-03-15T10:00:00ZRetrieve workflows starting before this timestamp (ISO 8601 format).
Filter by workflow status:
PENDING- Currently executingSUCCESS- Completed successfullyERROR- Failed with an errorENQUEUED- Queued for executionCANCELLED- Cancelled by userMAX_RECOVERY_ATTEMPTS_EXCEEDED- Exceeded retry limit
Filter by application version.
Filter by workflow function name.
Application database URL.
System database URL.
Schema name for DBOS system tables.
Examples
List recent workflows:dbos workflow get
Retrieve detailed status of a specific workflow.Arguments
The workflow ID to retrieve.
Options
Application database URL.
System database URL.
Schema name for DBOS system tables.
Example
dbos workflow steps
List all steps executed by a workflow.Arguments
The workflow ID whose steps to list.
Options
Application database URL.
System database URL.
Schema name for DBOS system tables.
Example
dbos workflow cancel
Cancel a workflow to prevent automatic retries and restarts.Arguments
The workflow ID to cancel.
Options
Application database URL.
System database URL.
Schema name for DBOS system tables.
Behavior
- Sets the workflow status to
CANCELLED - Prevents automatic retries on failure
- Prevents recovery on application restart
- Does not immediately stop a running workflow (it will complete its current step)
Example
Cancelled workflows can be resumed using
dbos workflow resume.dbos workflow resume
Resume a previously cancelled workflow.Arguments
The workflow ID to resume.
Options
Application database URL.
System database URL.
Schema name for DBOS system tables.
Behavior
- Changes workflow status from
CANCELLEDback toPENDING - Allows the workflow to be recovered on next application start
- Re-enables automatic retries
Example
dbos workflow fork
Create a new workflow instance by forking an existing workflow, optionally starting from a specific step.Arguments
The workflow ID to fork from.
Options
Step number to restart from (1-indexed).
Custom ID for the forked workflow. If not provided, a new UUID is generated.
Custom application version for the forked workflow.
Application database URL.
System database URL.
Schema name for DBOS system tables.
Behavior
- Creates a new workflow with the same inputs as the original
- Optionally starts from a specific step (useful for retrying after a failure)
- The original workflow is unchanged
- Returns the status of the newly forked workflow
Examples
Fork from the beginning:Queue Commands
Manage enqueued workflows with thedbos workflow queue subcommand.
dbos workflow queue list
List enqueued workflows.Options
Maximum number of results to return.
Offset for pagination.
Sort in descending order (older first).
Filter by creation time (after this timestamp).
Filter by creation time (before this timestamp).
Filter by status (PENDING, SUCCESS, ERROR, ENQUEUED, CANCELLED).
Filter by queue name.
Filter by workflow function name.
Application database URL.
System database URL.
Schema name for DBOS system tables.
Examples
List all enqueued workflows:Common Workflows
Debugging a Failed Workflow
Monitoring Workflow Execution
Managing Long-Running Workflows
Working with Queues
Output Format
All commands output JSON for easy parsing and scripting. Common fields:| Field | Type | Description |
|---|---|---|
workflow_id | string | Unique workflow identifier |
name | string | Workflow function name |
status | string | Current status (PENDING, SUCCESS, ERROR, etc.) |
authenticated_user | string | null | User who triggered the workflow |
created_at | string | ISO 8601 timestamp when workflow was created |
updated_at | string | ISO 8601 timestamp of last update |
application_version | string | Application version that created the workflow |
input | object | Workflow input arguments |
output | any | Workflow output (if completed) |
error | string | null | Error message (if failed) |
See Also
- CLI Overview - General CLI usage
- Database Commands - Database management
- Workflow Management Guide - Workflow patterns and best practices
- DBOSClient - Programmatic workflow management