https://prefect.io logo
Title
o

Oscar Björhn

08/18/2022, 11:34 AM
2.1.0 seems great, I especially like being able to set schedules when building! However, as far as I can tell, there's no way to set the timezone, unless I'm missing something. If I'm not missing something I'll go ahead and create a github issue, just figured I'd check first.
1
a

Anna Geller

08/18/2022, 11:56 AM
Interesting question and thanks for raising this. The schedules on the CLI are meant for simpler use cases (running flow X every Y minutes/seconds/hours etc.) and for more advanced configuration, such as setting the timezone, I'd recommend doing that via UI. Would this work for you?
there are some UX improvements and bug fixes for setting schedules via UI which are still in progress, but doing this via UI seems to be the easiest - curious to hear how you think about this?
a

Andreas Nigg

08/18/2022, 12:06 PM
I'd hijack this thread, I hope this is ok. 👼 This would ease up my CI workflows as well, if we could set timezone via cli - nevertheless for now it works as well with the UI. Comfort improvement, so to say 🙂
o

Oscar Björhn

08/18/2022, 12:16 PM
Yeah, UI works for us too! I do think being able to set it via the CLI would make the feature more complete, since the timezone, together with the cron/interval is a crucial part of a schedule.
💯 1
I can understand wanting to keep the cli features related to schedule simple though.
🙌 1
:thank-you: 1
a

Anna Geller

08/18/2022, 12:42 PM
Let me open an issue to investigate and discuss with the team @Marvin open "Explore extending schedules set from CLI to include custom timezones"
👍 1
c

Clint M

08/18/2022, 2:08 PM
seems like you can you do this via the rest api
if you boot up orion with
prefect orion start
and browse to http://127.0.0.1:4200/docs#/Deployments/schedule_deployment_deployments__id__schedule_post
you’ll see the docs:
Request body

application/json
Example Value
Schema
{
  "start_time": "2022-08-18T14:07:47.841Z",
  "end_time": "2022-08-18T14:07:47.841Z",
  "max_runs": 0
}
worth mentioning that I just updated to prefect 2.1 this morning though
so not sure when that api was introduced… it’d be nice if that was also in the docs 🙂
a

Anna Geller

08/18/2022, 2:38 PM
for sure, it can be done via API, so no surprise there -- Oscar asked about CLI though :)