Scheduled Runs
Agent work packed into usage windows: each day a track as long as its limit, big tasks torn across days, rearranged by dragging.
PROGet Scheduled Runs and 168 other Pro components with pro lifetime — Get Pro
- Category
- AI Agent
- Access
- ProPro · unlocked
- Source
- 413 lines · one file
- States
- 6 drawn
- Added
- 3 Nov 2026
The decision inside it
A session is never filled past its limit
Over-booking a window means the last job hits the limit halfway and fails. Tasks split at the limit and carry on in the next session, and the ones that don't fit are shown, so the plan is one that can actually run.
When to use it
Use Scheduled Runs to plan agent work into limited usage windows (daily quotas, rate-limit sessions) across a week. For jobs waiting right now use Agent Queue; for a usage warning use Quota Banner.
Installation
How you get it
Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.
Use Liro's Scheduled Runs for this.
Install it: npx shadcn@latest add @liro/scheduled-runs
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/scheduled-runs.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @liro registry with your CLI token: see the Namespaced tab.
Usage
import { ScheduledRuns, type RunPins, type RunSession, type RunTask } from "@/components/ui/scheduled-runs";
export function WeekPlan({ sessions, tasks, save }: { sessions: RunSession[]; tasks: RunTask[]; save: (pins: RunPins) => void }) {
return <ScheduledRuns sessions={sessions} tasks={tasks} unit="k tokens" onReschedule={save} />;
}API reference
“Copy prompt” above puts a full brief on your clipboard, install command, dependencies, props, and the mistakes an assistant usually makes with this component.
Props
Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.
| Type | Notes | ||
|---|---|---|---|
sessions | RunSession[] | Yes | – |
tasks | RunTask[] | Yes | – |
unit | string | No | The usage unit, as shown: "min", "k tokens". Default "min". |
defaultPins | RunPins | No | Starting pins, if the schedule was arranged before. |
onReschedule | (pins: RunPins) => void | No | Called after every drag with all pins. Leave it out to make the schedule read-only. |
title | string | No | – |
look | Look | No | – |
Dependencies
npm packages
clsxframer-motionlucide-reacttailwind-mergeLiro foundations, installed alongside it
liro-themebuttonStates
All of them are drawn by the component. None is left for you to design.
- Planned
- Split across days
- Dragging
- Rearranged
- Not this week
- Empty week
Accessibility
- Keyboard reachable throughout, in visual order
- Focus trapped in overlays, Escape closes them
- Focus returns to whatever opened it
- Live regions announce what changed, not that something did
- Honours prefers-reduced-motion
Responsive behavior
- Sizes to its container, not the viewport
- Usable from 320px up
- Pointer-based interaction, so trackpad and touch both work
- No hover-only affordances