Māris
10/11/2024, 11:02 AMMarvin
10/11/2024, 11:02 AMprefect deployment run 'your-deployment-name'
After deploying, Prefect usually provides instructions in the CLI for executing the deployment.
2. Prefect UI: You can also run your deployment through the Prefect UI by navigating to the specific deployment and clicking the "Run" button.
For more details, you can refer to Prefect 2.x Work Pools Documentation.
### Prefect 3.x
In Prefect 3.x, the deployment mechanism is provided using a serve
method. You can schedule runs with various options such as cron
for scheduled execution. Example syntax for setting up a deployment operation might be like this:
python
if __name__ == "__main__":
your_flow.serve(
name="your-deployment-name",
tags=["your-tag"],
parameters={"parameter_name": "value"},
cron="* * * * *" # Example cron schedule
)
This setup will actively schedule flows based on your specified configuration.
For additional configurations and options, check out the Prefect 3.x Deploy Run Flows Documentation.
You can alter these examples according to your deployment specifics, like adding parameters and tags as per requirement. Let me know if you need further assistance!