A recurring task: what it is, when it next runs, and how the last run went.
A paused schedule stays visible and says "Paused". Hiding it would leave a task nobody remembers to turn back on, and the last run's state is what tells somebody whether the pause was deliberate.
The switch's label names the task, so a page of schedules does not present a column of switches called "on".
import { ScheduleRow } from '@redrob-labs/ui';
| Prop | Type | Notes |
|---|---|---|
name |
string |
|
cadence |
string |
How often, in words, with the timezone: "Every weekday at 9:00, Seoul time". |
nextRun |
string |
|
lastRun |
{ state?: TaskStatusProps['state']; at?: string; label?: string } |
|
enabled |
boolean |
false reads as Paused rather than hiding the row. |
onToggle |
(event: React.ChangeEvent<HTMLInputElement>) => void |
Omit it and the schedule cannot be paused from here. Wired to the switch's onChange, so it receives the change event; event.target.checked is the next state. |
switchLabel |
string |
The switch's label: what is switched, not its state. Default "Runs on schedule: <name>". |
className |
string |