Add fuzzy scheduling support for weekly schedules #6693
Merged
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.
Weekly schedules previously required explicit times (e.g.,
weekly on monday at 06:30), causing all workflows to run simultaneously and creating load spikes. This adds fuzzy scheduling for weekly patterns to distribute execution times.Changes
New fuzzy schedule patterns:
weekly- Scatters across any weekday and time (10,080 possible slots)weekly on <day>- Scatters time on specific weekday (1,440 slots)weekly on <day> around HH:MM- Scatters within ±1 hour of target time (120 slots)Implementation:
FUZZY:WEEKLY,FUZZY:WEEKLY:<day>, andFUZZY:WEEKLY_AROUND:<day>:HH:MMpatternsIsWeeklyCron()helper to detect fixed weekly patternsExample:
Fixed weekly schedules still work but emit warnings recommending fuzzy alternatives.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/user/usr/bin/gh gh api user --jq .login -json GO111MODULE ache/go/1.25.0/x64/pkg/tool/linux_amd64/link GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/xTest User env 2593034/b370/console.test GO111MODULE 2593034/b370/importcfg.link GOINSECURE GOMOD GOMODCACHE SKxUVknvXufI3/2ZUc9vejZHNutLcI0T/var/run/docker/runtime-runc/moby(http block)/usr/bin/gh gh api user --jq .login(http block)/usr/bin/gh gh api user --jq .login -json GO111MODULE 1/x64/bin/node 44d029610ffef2175685fe8cbf023ab79e6/log.json GOMOD GOMODCACHE go env 59/create_discussion.js GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE 08d1e7cc9018fe0e--bundle(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.