prefect flow-run

prefect flow-run [OPTIONS] COMMAND [ARGS]...

Interact with flow runs.

prefect flow-run inspect

prefect flow-run inspect [OPTIONS] ID

View details about a flow run.

ID
string
required

[required]

prefect flow-run ls

prefect flow-run ls [OPTIONS]

View recent flow runs or flow runs for specific flows.

Arguments:

flow_name: Name of the flow

limit: Maximum number of flow runs to list. Defaults to 15.

state: Name of the flow run’s state. Can be provided multiple times. Options are ‘SCHEDULED’, ‘PENDING’, ‘RUNNING’, ‘COMPLETED’, ‘FAILED’, ‘CRASHED’, ‘CANCELLING’, ‘CANCELLED’, ‘PAUSED’, ‘SUSPENDED’, ‘AWAITINGRETRY’, ‘RETRYING’, and ‘LATE’.

state_type: Type of the flow run’s state. Can be provided multiple times. Options are ‘SCHEDULED’, ‘PENDING’, ‘RUNNING’, ‘COMPLETED’, ‘FAILED’, ‘CRASHED’, ‘CANCELLING’, ‘CANCELLED’, ‘CRASHED’, and ‘PAUSED’.

Examples:

$ prefect flow-runs ls —state Running

$ prefect flow-runs ls —state Running —state late

$ prefect flow-runs ls —state-type RUNNING

$ prefect flow-runs ls —state-type RUNNING —state-type FAILED

--flow-name

Name of the flow

--limit

Maximum number of flow runs to list

--state

Name of the flow run’s state

--state-type

Type of the flow run’s state

prefect flow-run delete

prefect flow-run delete [OPTIONS] ID

Delete a flow run by ID.

ID
string
required

[required]

prefect flow-run cancel

prefect flow-run cancel [OPTIONS] ID

Cancel a flow run by ID.

ID
string
required

[required]

prefect flow-run logs

prefect flow-run logs [OPTIONS] ID

View logs for a flow run.

ID
string
required

[required]

--head

Show the first 20 logs instead of all logs.

--num-logs

Number of logs to show when using the —head or —tail flag. If None, defaults to 20.

--reverse

Reverse the logs order to print the most recent logs first

--tail

Show the last 20 logs instead of all logs.

prefect flow-run execute

prefect flow-run execute [OPTIONS] [ID]
ID
string

ID of the flow run to execute