https://prefect.io logo
j

John Mizerany

09/08/2023, 3:24 PM
Is there a way to pass a
null
in for the cron flag for a deployment? We have two workspaces and don’t want the schedules to run in one of them as the other is more for testing. This would be using the CLI so
prefect deploy
1
We have a cron schedule in our prefect.yaml file, and essentially want to override that for the testing environment so it won’t run on a schedule. I tried to set a year earlier than this year so technically it won’t ever run, but I get invalid cron expressions. Seems to be with the package croniter but not sure if that’s it or not
j

Jake Kaplan

09/08/2023, 4:27 PM
hey, when do
prefect deploy
you can opt to not pass a schedule. Alternatively you can pass the schedule and disable it with:
Copy code
prefect deployment pause-schedule
or via the client/api etc.
j

John Mizerany

09/08/2023, 5:32 PM
Gotcha. On prefect deploy we have a schedule in our yaml file we want to keep, we just when we deploy to another workspace we don’t want that schedule to run
I was curious if there was a way to pass a flag in to prevent that
j

Jake Kaplan

09/08/2023, 6:14 PM
ah gotcha, if you're okay modifying the yaml I'm pretty sure set the schedule to
null
as opposed to the cron under the schedule
Copy code
schedule: null
s

Serina

09/08/2023, 7:43 PM
@Jake Kaplan just want to clarify I think you’re referring to setting the schedule to
null
in the
deployments
section, rather than modifying the existing
schedule
section at the top of the
prefect.yaml
upvote 1
j

Jake Kaplan

09/08/2023, 7:44 PM
yes, thank you for clarifying that! 😅
j

John Mizerany

09/08/2023, 7:45 PM
Yes correct, the cli doesn’t have a
schedule
flag