# Cron Job Health block

> Cron job health KPI strip with SLO sparkline, failure split and next run track

4 KPI tiles for a cron job fleet: active jobs by health, success rate against a dashed SLO line, failed vs timed out runs and the next scheduled run. Built on ReUI Frame, Badge, IconTile and shadcn Chart, Progress. For scheduler and job monitoring.

- Type: Pro block
- Category: [Sparkline](https://reui.io/blocks/chart/sparkline.md)
- Page: https://reui.io/blocks/chart/sparkline/chart-31
- MCP: `get_block("chart-31")`
- Built with: Badge, Frame, Icon Tile, Progress, Spinner
- Installs with a ReUI Pro or Ultimate license; setup: https://reui.io/docs/license-setup

## Best for

A cron fleet strip of 4 tiles derived from run history at a fixed time: health ticks, an SLO sparkline, a failure split and a next run track

## Agent notes

- Replace `RAW_JOBS` in data.tsx; `buildHistory` invents each job's runs from its `pattern` string and cron `schedule`, so pass real `runs` instead
- `FLEET`, `NEXT_UP` and `HOUR_RUNS` are computed once at module load against the fixed `REFERENCE_MS`, so no figure moves until you recompute them
- `OFFSET_MIN` holds fixed summer offsets for New York and Dublin, so schedules in those zones land an hour off after a DST change

## When not to use

- Service health figures for an API, each led by a segmented ring gauge: use [API Health](https://reui.io/blocks/chart/radial-chart/chart-8.md) (`get_block("chart-8")`)
- Each job on its own row with a strip of recent runs and failing streaks: use [Cron Run History](https://reui.io/blocks/chart/status-tracker/chart-34.md) (`get_block("chart-34")`)

## Install

```bash
npx shadcn@latest add @reui/chart-31
```

## About Sparkline blocks

### When to use

- Rows of metric tiles, each pairing its value with a sparkline, a meter or a delta
- Health strips for cron jobs, SLOs or data syncs that open with KPI tiles and mini trends
- Metric lists where every row ends in a small trend and a change badge

### When not to use

- Plain KPI numbers that need only a delta badge, an actions menu or a progress bar: use the [Stats blocks](https://reui.io/blocks/application/stats.md)
- One metric that deserves a full width plot with axes and a tooltip: use the [Area Chart blocks](https://reui.io/blocks/chart/area-chart.md)
- A whole overview page that sets a header, summary tiles and a work list around its plots: use the [Dashboard blocks](https://reui.io/blocks/application/dashboard.md)

### Agent notes

- `Chart` takes no props and fetches nothing: every tile value and series comes from constants in the block's own folder

Every ReUI item has a twin like this one; the index is https://reui.io/llms.txt. Agents with the ReUI MCP (https://reui.io/docs/mcp) get the same guidance from the getters named above.
