shadcn.io is not affiliated with official shadcn/ui
Cron Jobs Table Block for Solid
A table of scheduled jobs where a select sets each schedule and the cron expression, its plain-language sentence and the next run follow, with a pause switch and a Run now button that shows Running, then Succeeded.
Installation
Overview
Let people pick a schedule in words and still see the cron behind it, with this cron jobs table for Solid with Ark UI. Each row is a job from a scheduler: a name, a Native Select of five presets (Every 5 minutes, Hourly, Daily at 02:00, Weekdays at 08:30, Weekly on Sunday), and under it the cron expression in mono and a sentence that says what it means ("At 08:30 UTC, Monday to Friday."). Choosing a preset rewrites both lines and the next run, which is typed for each preset against a fixed 9 Oct, 12:00 UTC. A Switch pauses a job, so its status reads Paused and its next run becomes a dash, and Run now shows Running for 1.2 seconds, then Succeeded with "Ran in this demo", because nothing runs here. A polite line reports each change and otherwise sums up how many jobs are on schedule. On a phone the status and next run fold under the job, the last run goes away and Run now shrinks to an icon. It's built from Native Select, Switch, Button, Badge and Guides. For job schedulers, report builders and any screen where a schedule is chosen from presets.
FAQ
How do I add or change a schedule preset?
The presets are one typed list at the top of the file: each has an id, a label, its cron expression, the sentence and the ISO time of its next run. Add an entry and it appears in every row's select. The next runs are typed rather than computed because the page's clock is fixed; in your app derive them from the expression with a cron library.
What does pausing do?
The switch takes a job off its schedule: the status reads Paused, the next run is a dash with "Paused, no next run" for screen readers, and the polite line says the job is paused. Switching it on again restores the next run for its current preset. The job's last run and its errors are untouched.
What happens when I press Run now?
The button keeps its width and shows a spinner while the status reads Running for 1.2 seconds (at once under reduced motion). Then the job is Succeeded, its last run becomes the page's fixed "now" and the cell says "Ran in this demo", so it never claims to have executed anything. Focus returns to the same row's button once it can take it again.
Is it accessible?
Every control is named by its row: "Schedule for Send digest emails", "Keep Send digest emails on its schedule", "Run now: Send digest emails". Status is a word with a dot or an icon, never colour alone. The polite status line is present from load and speaks each change.
How does it look on a phone?
Below the medium breakpoint the job's cell gains its status badge and next run, the Next run and Status columns go, and below the large breakpoint so does Last run. The switch sits over a Run now icon button in the last column; its name is still "Run now: job".
What stays local, and how do I wire it for real?
Everything: the six jobs, their schedules, the pause switches and the runs are this page's state, and nothing is scheduled or executed. To make it real, save the schedule from chooseSchedule, store the pause from pause, call your scheduler's trigger endpoint from run, and replace the timer with its response.