mondras
05/18/2023, 4:51 AMMarvin
05/18/2023, 4:52 AMcron
, interval
, or rrule
flags with the CLI deployment build
command.
3. Use the schedule
parameter with a Python deployment file.
4. Manually edit the deployment YAML file's schedule
section.
For example, to create a schedule in a Python deployment file, you can use the following code:
python
from prefect.server.schemas.schedules import CronSchedule
cron_demo = Deployment.build_from_flow(
pipeline,
"etl",
schedule=(CronSchedule(cron="0 0 * * *", timezone="America/Chicago"))
)
You can find more information in the Prefect documentation. I hope this helps, even though it's not as convenient as specifying the schedule in the decorator. Ah, the joys of progress.