Jeandre de Bruyn
06/01/2026, 8:34 AMMarvin
06/01/2026, 8:34 AMMarvin
06/01/2026, 8:38 AMfoo- and schedule B should prepend `bar-`” with a dedicated per-schedule run-name setting. But you can get this behavior by using:
* a flow_run_name template on the flow
* schedule-specific parameters on each schedule
Example:
python
from prefect import flow
from prefect.schedules import Cron
@flow(flow_run_name="{run_prefix}-{date}")
def my_flow(run_prefix: str = "default", date: str = "today"):
print("hello")
my_flow.serve(
name="my-deployment",
schedules=[
Cron(
"0 8 * * *",
slug="morning",
parameters={"run_prefix": "morning", "date": "daily"}
),
Cron(
"0 20 * * *",
slug="evening",
parameters={"run_prefix": "evening", "date": "daily"}
),
],
)
That gives you run names like:
* morning-daily
* evening-daily
A few important notes:
* Schedules can override parameters per schedule.
* Schedules cannot set a separate run-name field directly.
* Schedules also do not support per-schedule job variables.
* If you need truly different behavior beyond parameter overrides, the cleaner option is often separate deployments.
If you want, I can also show the equivalent prefect.yaml version.
Relevant docs:
* Deployments
* Flows
* Serve flows locally