Skip to content
Back

Scheduled Runs

Agent tasks booked into a week of sessions that each have a usage limit: auto booking fills the gaps with small tasks and cuts big ones across sessions, manual keeps what you booked by hand, and one agent can be picked out.

oxyn add scheduled-runs
MCP

This week

Sessions of 5 h
All agents11 tasks
To book0
Nothing left to book
Mon16
Tue17
Wed18
08:00
100%
95%
0%
13:00
30%
95%
40%
18:00
100%
85%
0%

All tasks booked

Dioxus
rsx! {
    ScheduledRuns {
        tasks: Some(queue.tasks()),
        mode: SrMode::Auto,
        on_book: move |(id, cell)| queue.book(id, cell),
    }
}

Rendered from Rust at build time · goes live when visible

When to use

  • Plan a week of agent work against session usage limits: see what is booked where, what still waits, and which session is full, with automatic booking that packs small tasks into the gaps and cuts big ones across sessions.

When not to use

  • An agent asks before it acts: use Approval Card instead.
  • Several open requests in one card: use Approval pager instead.
  • An agent's question in its own card above the composer: use Decision Card instead.

Installation

Scheduled Runs is free and MIT. The oxyn CLI copies its code, and the components it needs, into src/oxyn/ of your Dioxus or GPUI project, so it is yours to change.

Terminal
cargo install --git https://github.com/ismailqureshi72/Oxyn oxyn-cli
oxyn init
oxyn add scheduled-runs
Rust
use crate::oxyn::{ScheduledRuns, STATUS_INDICATOR_CSS};

Rather depend on the crate? cargo add oxyn-dioxus oxyn-core --git https://github.com/ismailqureshi72/Oxyn, then use oxyn_dioxus::{ScheduledRuns, STATUS_INDICATOR_CSS};

Usage

Dioxus · rust
rsx! {
    ScheduledRuns {
        tasks: Some(queue.tasks()),
        mode: SrMode::Auto,
        on_book: move |(id, cell)| queue.book(id, cell),
    }
}

Examples

Auto

Auto: the whole list is booked into the week, biggest tasks first, small ones into the gaps; the one-and-a-half-session task lands in two sessions as 1/2 and 2/2.

This week

Sessions of 5 h
All agents11 tasks
To book0
Nothing left to book
Mon16
Tue17
Wed18
08:00
100%
95%
0%
13:00
30%
95%
40%
18:00
100%
85%
0%

All tasks booked

Code
rsx! {
    ScheduledRuns {
        tasks: Some(queue.tasks()),
        mode: SrMode::Auto,
        on_book: move |(id, cell)| queue.book(id, cell),
    }
}

Manual

Manual: only the five hand-booked runs stay; the other six wait in the list, one of them needing 150 % of a session.

This week

Sessions of 5 h
All agents11 tasks
To book6
Mon16
Tue17
Wed18
08:00
55%
0%
0%
13:00
30%
60%
40%
18:00
0%
70%
0%

6 waiting to be booked

Code
rsx! {
    ScheduledRuns {
        tasks: Some(queue.tasks()),
        mode: SrMode::Auto,
        on_book: move |(id, cell)| queue.book(id, cell),
    }
}

Filtered

One agent picked: its pill and count show in the header and every other agent's card fades.

This week

Sessions of 5 h
Codex2 tasks
To book0
Nothing left to book
Mon16
Tue17
Wed18
08:00
100%
95%
0%
13:00
30%
95%
40%
18:00
100%
85%
0%

All tasks booked

Code
rsx! {
    ScheduledRuns {
        tasks: Some(queue.tasks()),
        mode: SrMode::Auto,
        on_book: move |(id, cell)| queue.book(id, cell),
    }
}

Open

A waiting task opened: its details, what it needs, and buttons for the sessions it still fits in, so booking works without a drag.

This week

Sessions of 5 h
All agents11 tasks
To book6
Mon16
Tue17
Wed18
08:00
55%
0%
0%
13:00
30%
60%
40%
18:00
0%
70%
0%

6 waiting to be booked

Code
rsx! {
    ScheduledRuns {
        tasks: Some(queue.tasks()),
        mode: SrMode::Auto,
        on_book: move |(id, cell)| queue.book(id, cell),
    }
}

Booked open

A booked task opened: where it runs, and a button that takes it back to the list (the board switches to Manual so it stays there).

This week

Sessions of 5 h
All agents11 tasks
To book0
Nothing left to book
Mon16
Tue17
Wed18
08:00
100%
95%
0%
13:00
30%
95%
40%
18:00
100%
85%
0%

All tasks booked

Code
rsx! {
    ScheduledRuns {
        tasks: Some(queue.tasks()),
        mode: SrMode::Auto,
        on_book: move |(id, cell)| queue.book(id, cell),
    }
}

Overbooked

A hand drop that overfills a session: its bar and figure turn red and the status line names the session.

This week

Sessions of 5 h
All agents11 tasks
To book5
Mon16
Tue17
Wed18
08:00
55%
0%
0%
13:00
30%
210%
40%
18:00
0%
70%
0%

Tue 17 · 13:00 is over its limit (210%)

Code
rsx! {
    ScheduledRuns {
        tasks: Some(queue.tasks()),
        mode: SrMode::Auto,
        on_book: move |(id, cell)| queue.book(id, cell),
    }
}

Narrow

Under 560 px the list moves above the week and cards in the sessions keep only their title and share.

This week

Sessions of 5 h
All agents11 tasks
To book0
Nothing left to book
Mon16
Tue17
Wed18
08:00
100%
95%
0%
13:00
30%
95%
40%
18:00
100%
85%
0%

All tasks booked

Code
rsx! {
    ScheduledRuns {
        tasks: Some(queue.tasks()),
        mode: SrMode::Auto,
        on_book: move |(id, cell)| queue.book(id, cell),
    }
}

Classic

Classic style: square cards with an agent stripe, a dashed list column.

This week

Sessions of 5 h
All agents11 tasks
To book0
Nothing left to book
Mon16
Tue17
Wed18
08:00
100%
95%
0%
13:00
30%
95%
40%
18:00
100%
85%
0%

All tasks booked

Code
rsx! {
    ScheduledRuns {
        tasks: Some(queue.tasks()),
        mode: SrMode::Auto,
        on_book: move |(id, cell)| queue.book(id, cell),
    }
}

API reference

ScheduledRuns

PropTypeDefaultDescription
tasksOption<Vec<SrTask>>Default::default()The tasks (the demo's when `None`).
agentsOption<Vec<SrAgent>>Default::default()The agents for the filter (the demo's when `None`).
modeSrModeSrMode::AutoStarting booking mode.
agentOption<String>Default::default()An agent picked from the start.
openOption<String>Default::default()A task opened from the start (id).
bookedVec<(String, usize)>Default::default()Hand bookings from the start (task id → cell).
titleString"This week"Heading.
subtitleString"Sessions of 5 h"Muted line beside the heading.
styleStringDefault::default()`clean`, `classic`, or empty to follow `data-cstyle`.
on_bookEventHandler<(String, usize)>—A task was booked by hand (id, cell).
on_modeEventHandler<SrMode>—The mode changed.
on_filterEventHandler<Option<String>>—The agent filter changed.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabMoves through the filter, the mode switch and the cards
EnterorSpaceOpens a card's details; inside, books it into a session or takes it back
EscapeCloses the details

Accessibility

  • Auto | Manual is a radio group; the agent buttons are toggles named after the agent.
  • Each card's name gives its title, agent and share of a session; each session names how much of its limit is booked.
  • Booking never needs a drag: the details list the sessions that still have room. Overbooking is said in the status line, not only in red.

Responsive behaviour

  • The three days share the width after a 136 px list column.
  • Under 560 px the list sits above the week and cards in the sessions drop their description and figures.
Edge cases (spec)

Under 560 px the list sits above the week (cards wrap in rows) and cards inside sessions keep only title and share.

Notes for AI

  • Import ScheduledRuns from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: ScheduledRunsEl in oxyn_gpui.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI