https://prefect.io logo
Title
s

Sam Garvis

09/06/2022, 6:59 PM
It would be nice if the schedule didn't wipe every time you re-apply a deployment
1
a

Anna Geller

09/06/2022, 8:16 PM
just to clarify: you would like that reapplying doesn't delete scheduled runs?
the issue with this is that when you reapply a deployment with a specific schedule, you might want to specify a different schedule, so deleting all scheduled runs when reapplying a deployment actually makes sense
curious what's your use case? what's your schedule interval? how often do you reapply your deployment?
we already have several flags in place allowing you to e.g. only build or only apply a deployment and configure when upload happens (--upload/--skip-upload)
additionally, we are working on this which will allow you to set the schedule separately from the build/apply steps https://github.com/PrefectHQ/prefect/pull/6697 - I think this might be what you're looking for? (still WIP)
👍 2
s

Sam Garvis

09/06/2022, 8:24 PM
My use case is that I would prefer to set the schedule through the UI, but currently I feel this is not feasible because if I ever make a change to a deployment and apply through the CLI, it nulls out the schedule. So if I re-apply something, the schedule that I created through the UI now disappears. It would be nice if the schedule didn't disappear if you don't specify a schedule through the CLI. Because of this, I am now specifying a cron job schedule through the CLI with --cron, but you can't specify timezone which is manual.
a

Anna Geller

09/06/2022, 8:28 PM
if I re-apply something, the schedule that I created through the UI now disappears
I actually think that the opposite is true! if you set the deployment through UI and you then reapply a deployment without any schedule, then the current schedule set through the UI should be kept as long as you also run the build step https://discourse.prefect.io/t/i-created-a-deployment-then-i-added-a-schedule-from-the-[…]le-manually-from-cli-or-in-yaml-why-is-that-happening/1460
so I believe the solution you are looking for is using:
prefect deployment build ... --apply
+ setting schedule through UI if this is not working as described in the Discourse topic, please open a GitHub issue