.timezone() method.
Setting a timezone
Use the.timezone() method to specify a timezone for a scheduled task:
Timezone format
The scheduler uses timezone identifiers from the IANA Time Zone Database. Common examples include:America/New_York- Eastern Time (US)America/Chicago- Central Time (US)America/Los_Angeles- Pacific Time (US)Europe/London- British TimeEurope/Paris- Central European TimeAsia/Tokyo- Japan Standard TimeAustralia/Sydney- Australian Eastern TimeUTC- Coordinated Universal Time
Examples
Daily reports at different timezones
Business hours in a specific timezone
Multi-region deployments
Midnight tasks in different regions
How timezone affects scheduling
When you set a timezone on a schedule, the cron expression is evaluated in that timezone’s context:- 7:00 AM UTC during Eastern Standard Time (winter)
- 6:00 AM UTC during Eastern Daylight Time (summer)
Daylight saving time
The timezone setting ensures your tasks correctly handle daylight saving time transitions:During the “fall back” transition when clocks move backward, a task scheduled at the repeated hour may execute twice. During the “spring forward” transition, a task scheduled at the skipped hour will execute at the next available time.
UTC scheduling
For tasks that should run at absolute times regardless of local time zones, use UTC:Testing timezone-aware schedules
When testing timezone-aware schedules, remember that the schedule evaluates in the specified timezone:Combining with other methods
The.timezone() method can be chained with any schedule frequency methods: