Skip to content

feat(scheduling): @scheduled(zone=...) time-zone-aware cron (v26.06.44)#71

Merged
ancongui merged 1 commit into
mainfrom
feat/scheduled-timezones
Jun 7, 2026
Merged

feat(scheduling): @scheduled(zone=...) time-zone-aware cron (v26.06.44)#71
ancongui merged 1 commit into
mainfrom
feat/scheduled-timezones

Conversation

@ancongui
Copy link
Copy Markdown
Contributor

@ancongui ancongui commented Jun 7, 2026

@scheduled(cron=..., zone="America/New_York") now evaluates cron expressions in the given IANA time zone (Spring's @Scheduled(zone=...)), defaulting to UTC. CronExpression gained a zone argument and computes fire times via a zone-aware _now(); the task scheduler threads the zone through. Tests (4): UTC default, zone fires at zone-midnight, zone changes the UTC instant, decorator records zone. Gates: mypy --strict (619), ruff+format, full suite 3833.

…6.06.44

@scheduled(cron=, zone='America/New_York') evaluates cron in the given IANA time zone
(Spring @scheduled(zone=)); defaults to UTC. CronExpression gained a zone arg + computes
fire times via a zone-aware _now(); the task scheduler threads zone -> CronExpression.

Tests: tests/scheduling/test_cron_timezone.py (4). Gates: mypy --strict (619), ruff + format,
full suite 3833 passed.
@ancongui ancongui merged commit c9e7b8c into main Jun 7, 2026
5 checks passed
@ancongui ancongui deleted the feat/scheduled-timezones branch June 7, 2026 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant