<@U0380MW6MHU> <@U021J8TU753> In Prefect 2, I Need to schedule the particular flow twice in Prefect ...
m
@Will Raphaelson @Prefect In Prefect 2, I Need to schedule the particular flow twice in Prefect UI Cron. For example I have "Test" flow first I schedule in 8.00 AM IST and need to schedule same "Test" flows in 9.00 AM IST also. In prefect there is no option to schedule twice for "Test" flow in Cron. Can you help me on this?
h
Can you create two deployments for the same flow with different cron schedules?
m
No, In Prefect 1 version we can schedule the flow in twice in one flows itself. There is no option to schedule twice in prefect 2.
h
I'm not aware of how you schedule a flow run without a deployment, so perhaps this is just a different paradigm in 2.0 (?) -- but there's no reason that I'm aware of that you can't create 2 different deployments with the same flow and different times (and different names). Something like (untested):
Copy code
prefect deployment build --name "9am Run" --cron "0 9 * * *" --skip-upload --apply path/to/my_flow.py:my_flow
prefect deployment build --name "9pm Run" --cron "0 21 * * *" --skip-upload --apply path/to/my_flow.py:my_flow