Tan Li
09/05/2022, 5:15 AMprefect deployment build --cron "00 1 * * *"
But how can I specify timezone in cli like how it can be done through the python object interface (I am having a weird bug, i.e. some folder under /tmp/* could not be found if a python deployment get execute in the second time)? I searched a bit on Github but only found some python code, and I also tried to looked at the code implementation (on 2.3.0), but it’s not very clear to me where that TimeZone flag got specified (already got lost in the *args maze) Any help would be appreciated! 🙏🙏🙏Oscar Björhn
09/05/2022, 7:28 AMTan Li
09/05/2022, 7:48 AMOscar Björhn
09/05/2022, 7:51 AM# Add timezone to schedule, if the deployment build has a schedule.
if cron is not None:
with open(f"{flow_name_clean}-deployment.yaml") as r:
text = r.read().replace("timezone: null", "timezone: Europe/Stockholm")
with open(f"{flow_name_clean}-deployment.yaml", "w") as w:
w.write(text)
Tan Li
09/05/2022, 7:56 AM