Repository navigation
Start scheduled automations at a random time in a window, like a coworker (GODM-32) - #30
Merged
Merged
Conversation
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.
What does this change?
Scheduled automations can start at a random time within a window, like a coworker who starts somewhere between 8:00 and 9:30 instead of on the dot (GODM-32).
schedulegets an optionalstartWindowMinutes(0–720)."0 8 * * 1-5"+ 90 = weekdays, somewhere between 08:00 and 09:30, drawn anew for every run.startWindowLimitin@godmode/shared. Core and UI both use it; gaps shortened by a DST change don't count.routine_create/routine_updatetools and the orchestrator prompt knowstartWindowMinutes, so "start sometime between 8 and 9:30 on weekdays" can be set up from one sentence. There is a new example to match in the "Describe what to automate" card.onTicknow refreshesnext_run_atfor schedules too. Before, a tick skipped because the previous run was still busy left the past time in place.How was it tested?
pnpm typecheck: clean.pnpm build:ui: builds.bun testinpackages/core: 679 pass, 0 fail (after mergingmain). New tests cover:GODMODE_HOME:Checklist
pnpm typecheckandpnpm testpasscargo clippy/cargo testpass (ifapps/desktop/src-taurichanged) — not changedpackages/sharedandapps/desktop/src/lib/api.tsdocs/ARCHITECTURE.md)