When deploying through the CLI with --cron command...
# prefect-community
n
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
🙏 1
👍 1
a
yup there is:
Copy code
--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:
Copy code
prefect deployment set-schedule flow_name/deploy_name --cron '0 9 * * *' --timezone 'America/New_York'
n
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
CRON is easier anyway for a daily schedule, rrule is only needed for more complex scheduled. well done!
n
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
rrule is already fully supported
n
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
what problem are you trying to solve? what schedule do you want to assign? let's talk business problem rather than tech 🙂
n
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'