mondras05/18/2023, 4:51 AM
Marvin05/18/2023, 4:52 AM
flags with the CLI deployment
command. 3. Use the
parameter with a Python deployment file. 4. Manually edit the deployment YAML file's
section. For example, to create a schedule in a Python deployment file, you can use the following code:
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.
python from prefect.server.schemas.schedules import CronSchedule cron_demo = Deployment.build_from_flow( pipeline, "etl", schedule=(CronSchedule(cron="0 0 * * *", timezone="America/Chicago")) )