Conversation
Thread transfer impact
This comment will update automatically after the next completed run. |
This branch has not been deployed
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 Changed
Scheduled tasks can now be limited to certain days and hours and capped after a number of runs. An interval schedule accepts three optional fields:
weekdays: days it may run on ([1,2,3,4,5]is Monday to Friday).window: a local time range such as{start:'09:00', end:'17:00'}. Runs outside it wait for the next opening. A run that comes due while the app was closed or asleep and lands outside the window is skipped forward, not fired late. Windows never cross midnight; a window opening inside a DST spring-forward gap skips that day.maxRuns: a total-run cap, also valid on fixed-time schedules. The run that reaches it pauses the task in the same write and the row reads "Run limit reached (16/16)". Editing the schedule so the cap is raised or removed resumes it; an explicitenabledin the same update wins.So
{type:'interval', everyMs:1800000, weekdays:[1,2,3,4,5], window:{start:'09:00', end:'17:00'}, maxRuns:16}means "check every half hour during weekday business hours, at most 16 checks".Surfaces: contracts, server scheduler, web editor and task rows, mobile editor and task rows, the
schedule_task/update_scheduled_taskMCP schemas and descriptions, anddocs/user/scheduled-tasks.md. Existing tasks and callers are unaffected because every field is optional. Providers, checkpointing and the v1 path are untouched. Base isbase/ov2-standalone-20260918because the scheduler only exists there.Why
Recurring automations either ran forever at their cadence or had to be paused by hand. Audit and babysitter tasks ("check every half hour, only while the office is open") need runs confined to working hours and a natural end, or a forgotten automation burns runs overnight and at weekends. This keeps the two-mode schedule model: no cron syntax, no new schedule types.
UI Changes
Editing a task before the change: the interval editor had only "Run every N minutes", and a stored task's row shows only "Every 30 min" (same stored task, rendered by the base build).
After: day toggles, an "Only between" window, and a "Stop after" run cap. The row reads
Every 30 min · weekdays · 09:00–17:00 · 16 runs max.Capture conditions: web client (headless Chrome, 900px viewport) against a disposable dev server and empty state. Both GIFs are sampled frames of real captures, not real-time recordings, so they show states rather than timing. The mobile editor mirrors these controls but was not run in a simulator.
Verification
Independent review by GPT-6 Astra (high) found five defects, all fixed here: web edits dropped restrictions (the edit path used a second, unaware builder), overdue runs fired outside the window after downtime, a DST gap could produce out-of-window runs, raising the cap did not resume a paused task, and capped rows showed "Paused" instead of the limit.
vp test run src/scheduledTasks/ src/mcp: 260 passed across 23 files. New cases: window snapping and weekday skips, empty masks, dispatch-time restriction check, New York spring-forward gap, cap pause on the reaching run, resume by raising or clearing the cap.vp test run src/components/settings/: 546 passed (including restriction edit patches through the builder the component imports).vp test run src/features/settings: 79 passed. packages/contractssrc/scheduledTask.test.ts: passed.tsc --noEmitclean for apps/web and apps/mobile; apps/server shows only theCheckpointDiffQuery.test.tserror that also fails on the base.vp lintandvp fmtclean on touched files.Checklist
Implementation by GLM (xlarge) in T3 Code; audit fixes and verification by Claude Sonnet 5.5 in Claude Code; independent review by GPT-6 Astra.