prefect shell

prefect shell [OPTIONS] COMMAND [ARGS]...

Serve and watch shell commands as Prefect flows.

prefect shell watch

prefect shell watch [OPTIONS] COMMAND

Executes a shell command and observes it as Prefect flow.

COMMAND
string
required

[required]

--log-output

Log the output of the command to Prefect logs.

--flow-run-name

Name of the flow run.

--flow-name

Name of the flow.

--stream-stdout

Stream the output of the command.

--tag

Optional tags for the flow run.

prefect shell serve

prefect shell serve [OPTIONS] COMMAND

Creates and serves a Prefect deployment that runs a specified shell command according to a cron schedule or ad hoc.

This function allows users to integrate shell command execution into Prefect workflows seamlessly. It provides options for scheduled execution via cron expressions, flow and deployment naming for better management, and the application of tags for easier categorization and filtering within the Prefect UI. Additionally, it supports streaming command output to Prefect logs, setting concurrency limits to control flow execution, and optionally running the deployment once for ad-hoc tasks.

COMMAND
string
required

[required]

--flow-name

Name of the flow

--deployment-name

Name of the deployment

--tag

Tag for the deployment (can be provided multiple times)

--stream-stdout

Stream the output of the command

--cron-schedule

Cron schedule for the flow

--timezone

Timezone for the schedule

--concurrency-limit

The maximum number of flow runs that can execute at the same time

--run-once

Run the agent loop once, instead of forever.