fix(cron): Apply timezone from schedule.TZ for cron expressions#1092
Closed
liugangjian wants to merge 1 commit intosipeed:mainfrom
Closed
fix(cron): Apply timezone from schedule.TZ for cron expressions#1092liugangjian wants to merge 1 commit intosipeed:mainfrom
liugangjian wants to merge 1 commit intosipeed:mainfrom
Conversation
…evel fallback Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <[email protected]>
faa31fd to
6324427
Compare
This was referenced Mar 9, 2026
10 tasks
|
@liugangjian Hi! This PR has had no activity for over 2 weeks, so I'm closing it for now to keep things organized. Feel free to reopen anytime if you'd like to continue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #1044
Cron expressions currently ignore the
schedule.TZfield and always evaluate in UTC, causing jobs to trigger at incorrect local times.Changes
schedule.TZfrom individual cron jobtools.cron.default_timezonefrom config"Asia/Shanghai"as final fallbackcomputeNextRun()to convert reference time to target timezone before evaluationdefault_timezoneconfig option in tools.cron sectionExample
Before: cron expression
0 9 * * *triggers at UTC 9:00 (17:00 CST)After: cron expression
0 9 * * *triggers at local 9:00 when TZ is set correctlyType of Change
AI Code Generation
Checklist
make checkand all checks pass