You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: Active time window for interval scheduled tasks #26116
Recurring scheduled tasks can only be interval (every N ms, around the clock) or fixed_time (one wall-clock time, optional weekdays). There is no way to say "run every hour, but only between 08:00 and 19:00".
My real use case: a recurring task that should run during working hours only, e.g. every 30–60 min from 08:00 to 19:00 on weekdays. Today the options are:
One fixed_time task per slot: 12 tasks for hourly 08–19, 24 for every 30 min. Works, but it's a pain to create, edit, pause, or change the prompt for all of them at once.
interval plus a guard in the prompt ("if local time is outside 08:00–19:00, reply 'skipped' and stop"): one task, but every off-hours tick still starts an agent turn and spends usage/tokens just to decide not to work. It also fills the thread with no-op turns.
Proposal
Add an optional active window to interval schedules:
{
"type": "interval",
"everyMs": 1800000,
"activeWindow": {
"start": "08:00", // local wall-clock, inclusive"end": "19:00", // local wall-clock, exclusive; end < start could mean an overnight window"weekdays": [1, 2, 3, 4, 5] // optional, same convention as fixed_time (0 = Sunday)
}
}
Behavior:
Ticks that fall outside the window are skipped by the scheduler, so no turn starts and no usage is spent.
nextRunAt jumps to the next in-window slot (e.g. Friday 19:00 → Monday 08:00).
Ideally the first run of each window fires at start (08:00) rather than "whenever the interval happens to land", i.e. intervals align to the window start.
UI: in the schedule editor, add a "Only between [08:00] and [19:00] on [weekdays]" row under the interval picker. MCP: expose the same field on schedule_task / update_scheduled_task.
Alternatives considered
Allowing multiple timeOfDay values on fixed_time (["08:00","09:00",...]) would also help, but an interval plus window is easier to express and edit.
Full cron syntax (*/30 8-18 * * 1-5) covers this too, but is less friendly in the UI. It could be an advanced option.
Activity