Erik Amundson
10/04/2023, 6:24 PMfrom prefect.client.schemas import schedules
from prefect.client.schemas.schedules import DateTimeTZ
pst = "America/Los_Angeles"
daily_midnight_offset_30 = schedules.IntervalSchedule(
anchor_date=DateTimeTZ(year=2020, month=1, day=1, hour=0, minute=30), timezone=pst, interval=timedelta(hours=24)
)
But the schedule runs at 17:30 Pacific (00:30 UTC). Do python schedules not respect the time zone?Erik Amundson
10/04/2023, 6:26 PMDeployment.build_from_flow( # type: ignore
name=name,
flow=fn,
schedule=daily_midnight_offset_30,
work_pool_name="xx",
work_queue_name="default",
version=version,
infrastructure=<infra block>,
parameters={},
tags=[],
is_schedule_active=True,
apply=True,
)
Jake Kaplan
10/04/2023, 6:40 PMschedule = IntervalSchedule(
anchor_date=datetime(year=2020, month=1, day=1, hour=0, minute=30, tz="America/Los_Angeles")
I think it will give what you wantJake Kaplan
10/04/2023, 6:42 PM17:30 Pacific
Erik Amundson
10/04/2023, 6:58 PM