<@ULVA73B9P> how do I run a deployment the first d...
# ask-marvin
a
@Marvin how do I run a deployment the first day of each month at 10:00
m
thought for 157.9 seconds
You can schedule it with a cron expression. “First day of each month at 10:00” is: - Cron:
0 10 1 * *
- By default, Prefect uses UTC unless you specify a timezone. Two easy ways to set this up: Option A — via CLI (Prefect 3.x)
Copy code
prefect deploy ./path/to/flow.py:my_flow \
  --name monthly-10am \
  --cron "0 10 1 * *" \
  --timezone "America/New_York"
- Omit
--timezone
to run at 10:00 UTC. - Run from your project root. Option B — in Python when deploying
Copy code
from prefect import flow
from prefect.schedules import Cron

@flow
def my_flow():
    ...

if __name__ == "__main__":
    my_flow.deploy(
        name="monthly-10am",
        work_pool_name="my-pool",
        schedule=Cron("0 10 1 * *", timezone="America/New_York"),
    )
Docs for more details: - Schedules (concepts) - Schedule API Do you want this to run in a specific timezone? If so, which one?