Skip to content

fix: Align weekly schedules with week boundary - #6984

Open
usernamenenad wants to merge 3 commits into
superplanehq:mainfrom
usernamenenad:fix/weekly-schedule-week-boundary
Open

fix: Align weekly schedules with week boundary#6984
usernamenenad wants to merge 3 commits into
superplanehq:mainfrom
usernamenenad:fix/weekly-schedule-week-boundary

Conversation

@usernamenenad

Copy link
Copy Markdown
Contributor

Summary

Start weekly schedule searches at the target week boundary. This change keeps
every selected weekday eligible, including weekdays that occur before the day
when the schedule is set up.

Use calendar-day arithmetic so the calculation remains safe across time
changes.

Fixes #6983.

Test plan

  • Add a regression test for a Monday schedule that is set up on Wednesday.
  • Run make test PKG_TEST_PACKAGES=./pkg/triggers/schedule.
  • Run make format.go.
  • Run make lint.
  • Run make check.build.app.
  • Run make test.

Weekly schedules can skip selected weekdays that occur before the setup\nday. Start each search at the target week boundary so all configured\nweekdays remain eligible.

Signed-off-by: usernamenenad <radovic.nenad158@gmail.com>
@superplanehq-integration

Copy link
Copy Markdown
Contributor

👋 Commands for maintainers:

  • /sp start - Start an ephemeral machine (takes ~30s)
  • /sp stop - Stop a running machine (auto-executed on pr close)

@superplanehq-integration

Copy link
Copy Markdown
Contributor

Maintainers: comment /deploy-storybook to get a Storybook link for this PR.

@usernamenenad
usernamenenad deleted the fix/weekly-schedule-week-boundary branch August 28, 2026 18:30
@usernamenenad
usernamenenad restored the fix/weekly-schedule-week-boundary branch August 28, 2026 18:31
@usernamenenad usernamenenad reopened this Aug 28, 2026
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.

Weekly schedules skip weekdays before the setup day

1 participant