Schedule editor
When it runs: every n minutes, hourly, daily, weekdays, monthly or cron, said in words.
import { ScheduleEditor, describeCron, nextRuns } from "@forgeron/ui";at
Weekdays at 08:00Europe/Paris
0 8 * * 1-5import { ScheduleEditor } from "@forgeron/ui";
export default function Default() {
return (
<div style={{ width: 340 }}>
<ScheduleEditor
defaultValue="0 8 * * 1-5"
timezone="Europe/Paris"
modes={["hours", "daily", "weekly", "cron"]}
/>
</div>
);
}at
Mondays, Wednesdays and Fridays at 07:30
Timezone
30 7 * * 1,3,5- Fri 2026-11-20 07:30
- Mon 2026-11-23 07:30
- Wed 2026-11-25 07:30
- Fri 2026-11-27 07:30
import { ScheduleEditor } from "@forgeron/ui";
import { useState } from "react";
// `from` is now in the schedule's timezone, passed by the screen: the block never reads the clock.
export default function NextRunsAndTimezone() {
const [cron, setCron] = useState("30 7 * * 1,3,5");
const [tz, setTz] = useState("Europe/Paris");
return (
<div style={{ display: "grid", gap: 12, width: "100%", maxWidth: 520 }}>
<ScheduleEditor
value={cron}
onChange={setCron}
timezone={tz}
timezones={["Europe/Paris", "Europe/London", "UTC", "America/New_York"]}
onTimezoneChange={setTz}
from="2026-11-18T10:00"
preview={4}
/>
</div>
);
}Every day at 09:00 and 17:00UTC
- Wed 2026-11-18 17:00
- Thu 2026-11-19 09:00
- Thu 2026-11-19 17:00
import { ScheduleEditor } from "@forgeron/ui";
// What no plain shape says stays cron, still said in words when it can be.
export default function Cron() {
return (
<div style={{ width: "100%", maxWidth: 520 }}>
<ScheduleEditor defaultValue="0 9,17 * * *" timezone="UTC" from="2026-11-18T10:00" />
</div>
);
}API → Props
| Prop | Type | Default | Description |
|---|---|---|---|
value / defaultValue / onChange | string | — | A cron expression. |
timezone | string | — | Shown in the summary. |
timezones / onTimezoneChange | string[] / (tz) => void | — | A picker next to the summary. |
from | string | — | Now, YYYY-MM-DDTHH:MM in the timezone: the next runs are listed after it. |
preview | number | 3 | How many next runs. |
modes | Mode[] | — | The shapes offered, in order. |
disabled | boolean | — | Shown, not editable. |
className | string | — | Extra classes. |