caliper uidocs

Job runs

Pro

Scheduled jobs with each cron schedule said in words and the next run counting down, the last twenty runs as a strip of bars, run now, pause and resume, and every run’s log.

Installs components/ui/job-runs.tsxDepends on @radix-ui/react-slot, lucide-reactMotion shared motion tokens
pnpm dlx shadcn@latest add @caliper/job-runs

Scheduled jobs

  • Next Running89%
  • Next Succeeded100%
  • Next Succeeded95%
  • Not scheduledSucceeded100%

When to use #

Use it for

  • Background jobs, ETL and cron in a developer product.
  • Admin pages for recurring tasks.

Skip it when

  • A single long task with progress; use the run timeline.

Installation #

terminal
pnpm dlx shadcn@latest add @caliper/job-runs

Adds its 4 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

Usage #

Import it from your copy of the source. The example behind the preview comes with the source. It is built from parseCron, describeCron, nextCronRun and JobRuns.

example.tsx
import { parseCron, describeCron, nextCronRun, JobRuns } from "@/components/ui/job-runs"

The worked example comes with Pro

The 46-line example behind the preview opens here with a Pro or Team licence.

Checking your licence…

API reference #

parseCron

component

No props of its own; it accepts the native props of its root element.

describeCron

component

No props of its own; it accepts the native props of its root element.

nextCronRun

component

No props of its own; it accepts the native props of its root element.

JobRuns

component
PropTypeDefaultDescription
jobs *readonly ScheduledJob[]—
nownumber—Fix the clock (ms), e.g. in tests.
onRunNow((jobId: string) => void | Promise<void>)—
onTogglePause((jobId: string, paused: boolean) => void)—
classNamestring—

Accessibility #

It exposes img and status semantics, with aria-labelledby, aria-expanded, aria-controls, aria-hidden, aria-label and aria-selected kept in step with state. Changes that matter are announced through a live region.

No custom key handling; Tab and the native activation keys do the work.

Motion #

Transitions use the shared duration and easing tokens. Under prefers-reduced-motion those tokens collapse to instant and travel distances go to zero, so state changes still happen without movement.