Florian Giroud
11/26/2024, 9:59 PMMarvin
11/26/2024, 9:59 PMmy_flow.deploy
, you can set the timezone in your scheduling configuration. Here's the concise version of how it works:
1. Specify the Timezone: When setting up a schedule, you can provide a timezone that observes daylight saving time (DST). This will ensure your schedule adjusts appropriately, adhering to DST shifts if applicable. For example, a daily schedule that fires at 9 AM in the local time zone will continue to do so even when DST changes.
2. DST Adjustments: If your schedule is longer than 24 hours, it will automatically observe DST and keep the clock-hour constant. For intervals less than 24 hours, the schedule will follow UTC intervals.
Here's a relevant link to the documentation on adding schedules, which should guide you through the process: Prefect 3.x Schedule Documentation.
With this setup, assuming you provide the right scheduling details in your deployment configuration, Prefect should take care of the rest, saving you from the classic flagging down of servers to check the clock. If you need more specific guidance, you might want to delve further into the deployment and scheduling sections in the Prefect documentation.
If you still feel like you’re juggling too many time zones, just remember, you're not alone—the Earth's rotation feels complicated too!Nate
11/26/2024, 10:12 PMschedules
kwargNate
11/26/2024, 10:12 PMFlorian Giroud
11/26/2024, 10:16 PMfrom prefect.client.schemas.schedules import CronSchedule
schedules = [CronSchedule(cron="0 0 * * *")]
flow.deploy(... schedules = schedules)
Nate
11/26/2024, 10:16 PMtimezone
kwarg thereFlorian Giroud
11/26/2024, 10:19 PM