https://prefect.io logo
Title
n

Nic

10/21/2022, 8:37 AM
When deploying through the CLI with --cron command.. Is there a way to add the timezone argument to this as there is when creating a deploy via python?
1
:thank-you: 1
👍 1
a

Anna Geller

10/21/2022, 11:46 AM
yup there is:
--cron "0 9 * * *" --timezone "America/New_York"
ahh I know what you mean, for now you can do that in a separate CLI command after build:
prefect deployment set-schedule flow_name/deploy_name --cron '0 9 * * *' --timezone 'America/New_York'
n

Nic

10/21/2022, 12:06 PM
Great, cause i tried it in the build and was returned an error - I'll integrate this in our pipeline instead and test that out 🙂
🙌 1
👍 1
This Does not work for me I've tried it with both rrule and cron and with both i'm met with errors
Had to change some thing for cron to work
prefect deployment set-schedule --cron "0 9 * * *"  --timezone "America/New_York" flowname/deployment
The rrule is is not working
prefect deployment set-schedule --rrule "FREQ=YEARLY;BYMONTH=1;BYMONTHDAY=1" --timezone "America/New_York" flowname/deployment
I've tried to encapsulate the rule both in " and ' and also without encapsulating it
a

Anna Geller

10/24/2022, 11:05 AM
CRON is easier anyway for a daily schedule, rrule is only needed for more complex scheduled. well done!
n

Nic

10/26/2022, 10:49 AM
Is there any plan to make it work with rrule? We might need some pretty complex scheduling down the line, and would be great if it was an opportunity
a

Anna Geller

10/26/2022, 11:51 AM
rrule is already fully supported
n

Nic

10/26/2022, 12:44 PM
prefect deployment set-schedule --rrule "FREQ=YEARLY;BYMONTH=1;BYMONTHDAY=1" --timezone "America/New_York" flowname/deployment return errors when i run it. Is it supported like this?
a

Anna Geller

10/26/2022, 4:23 PM
what problem are you trying to solve? what schedule do you want to assign? let's talk business problem rather than tech 🙂
n

Nic

10/26/2022, 4:58 PM
The team wants to be able to setup schedules like 'monday every third week', 'first Sunday in a month' and 'first weekday in a month'