Skip to content
GitHub (opens in a new tab)

ScheduledRuns

Recurring agent runs in a kit Card: title, count and New schedule on top, then one row per run with the schedule in plain words, next run (exact time on hover or focus), last result and an on/off Switch, the row's only control. Paused rows say Paused instead of a next run.

stableOrganismcontracts/scheduledruns.json

Preview

ScheduledRuns

Recurring agent runs: when each runs next and how it last went. Not RunningNow.

Master

Inbox triage runs every 15 seconds. Switch a schedule on and it runs right away (Lead scoring fails); switch it off and any run stops. Hover or focus a row for the exact time.

Scheduled runs

5 schedules
Daily digestWeekdays at 9:00 · Done
Inbox triageEvery 15 seconds · Done
Invoice sweepEvery hour · Failed
Paused
Lead scoringEvery day at 18:00 · Failed
Paused
Backup checkSundays at 2:00 · Skipped

Usage

Write the schedule in plain words; the kit does not parse cron. Pass nextRunAt and lastRun as epoch ms and the list counts down on its own clock, or pass now to drive it. Times render after mount, so server and client markup match.

Do's

  • agents or jobs that run on a schedule ("Weekdays at 9:00") and people look over, pause or resume
  • see when each runs next and how its last run ended
  • a run in progress among scheduled ones: it shows Running live, then its result

Don'ts

  • what runs right now across agents — RunningNow
  • one run in detail — RunDetail
  • one-off agent tasks and their status — AgentOverview
  • a customer's billing charges — BillingSchedule
  • editing the schedule itself — TimePicker or DateTimePicker in a form
<ScheduledRuns
  runs={[
    { id: "digest", name: "Daily digest", schedule: "Weekdays at 9:00", state: "active", nextRunAt, lastRun: { result: "done", at } },
    { id: "sweep", name: "Invoice sweep", schedule: "Every hour", state: "paused", lastRun: { result: "failed", at } },
  ]}
  onPause={pause}
  onResume={resume}
  onCreate={openNewSchedule}
/>

When to use

  • agents or jobs that run on a schedule ("Weekdays at 9:00") and people look over, pause or resume
  • see when each runs next and how its last run ended
  • a run in progress among scheduled ones: it shows Running live, then its result

When not to use

  • what runs right now across agents — RunningNow
  • one run in detail — RunDetail
  • one-off agent tasks and their status — AgentOverview
  • a customer's billing charges — BillingSchedule
  • editing the schedule itself — TimePicker or DateTimePicker in a form

What an agent reads

import { ScheduledRuns } from "agentic-ds-kit";
must
  • a kit Card named by its title; the count is a Badge under it and New schedule a header Button
  • rows are a kit ListView list named like the Card; each row's name says the schedule, the last result, the next run and its exact time (or Paused), so nothing needs a hover
  • the exact time shows in a Tooltip on hover or focus of the row itself; the row is the only tab stop until it has focus
  • while a row has focus, Tab reaches its Switch ("<name> on schedule"), then leaves the list; arrow keys move between rows
  • result and pause changes are announced once in a polite live region; the countdown is never announced
  • status is an icon plus a word, never colour alone; failed is also said in words
  • motion: the status icon swaps in a fixed icon-size cell and Running…, Paused or the next run swap in one meta slot, both by crossfade in place. The meta slot is as wide as the widest of those texts in every row (measured after mount), so row height, the name column and the Switch never move. Pausing fades the row to muted, Running… shimmers, a check or cross draws in when a run finishes live (a first load stays still); all off under prefers-reduced-motion
defaults
  • size sm
stops if
  • Do not invent a local ScheduleList, CronList or RunRow; this is the piece
  • Do not wrap it in another Card; it brings its own
  • Do not show a next run on a paused or running row
  • Do not pass cron syntax as schedule; write it in plain words
  • Do not use colour as the only sign of a failed or skipped run
  • Do not render times on the server; pass now or let the list's clock run after mount
  • Do not use raw hex for status colours
  • Do not make New schedule a solid primary Button; it is a ghost header action
  • Do not add a Run now or other per-row button; turning the Switch on starts a run
  • ScheduledRuns has no loading or error prop: while its data loads or fails, render kit Skeleton, LoadError or Empty in its place

From contracts/scheduledruns.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.

Props

NameTypeRequiredDefaultNotes
runsarrayYes—{ id, name, schedule, state, nextRunAt?, lastRun? }[]. schedule is plain words shown as given (the kit does not parse cron). state is active | running | paused. nextRunAt is epoch ms and shows only on active rows. lastRun is { result: done | failed | skipped, at: epoch ms }. Rows keep one line per text (ellipsis, full text in the row name and title), so a state change never changes row height.
nownumberNo—Epoch ms the relative times count from. Left out, the list keeps its own clock (every second while a run is under two minutes away, else every 15 s). Times render only after mount, so server and first client markup match.
onPausefunctionNo—(id) => void. The row Switch turned off: stop any run in progress and set the row to paused (it crossfades to Paused, no next run). With onPause or onResume, every row gets a kit Switch named "<name> on schedule"; on means on schedule. The Switch is the row's only control.
onResumefunctionNo—(id) => void. The row Switch turned on: resume the schedule and start a run right away. Set the run to running, then to its result with the new nextRunAt: the meta slot shimmers Running… (the last result stays on the second line), then the check or cross draws in.
onCreatefunctionNo—() => void. A ghost New schedule Button in the Card header. It opens nothing itself.
labelstringNo—Card title and list name. Default KitLabels scheduledRuns ("Scheduled runs").
sizexs | sm | md | lgNosmListView row size.
emptyobjectNo—ListView empty: { title, description?, icon?, outlined? }.
  • Component
    →

    RunningNow

    Many agents, small: a strip of what runs now for a header (row of chips) or a sidebar (stack), with status, activity and a clock.

  • Block
    →

    Run detail

    One agent run on one screen: clock, cost, pending approval and every step, all following the step you pick.

  • Block
    →

    Agent overview

    The first screen of an agent workspace: what needs you, every agent's status, and what changed since your last visit.

  • Component
    →

    BillingSchedule

    A customer's billing schedule in a kit Card, one closed view: full (all charges in one Table), nextOnly (the next charge and its card) or failed (the open failed payment).