Cron Job Scheduler
A scheduled-task manager section: a bordered table listing every cron job with its monospace cron expression, last-run and next-run timestamps, execution duration, and a color-coded status badge. Built for internal admin panels and infrastructure dashboards.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its badge dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/cron-job-scheduler.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/devtools/devtools12.tsx instead.
Usage
The file also exports devtools12Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Devtools12, devtools12Demo } from "@/components/blocks/devtools/devtools12"; export default function Page() { return <Devtools12 {...devtools12Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Cron job scheduler" | Section heading. |
| description | string | undefined | Section intro text below the heading. |
| jobs | CronJob[] | [] | Rows of the scheduled-job table, in the order they should be displayed. |
| className | string | none | Extra classes for the outer section element. |
Types
type CronStatus = "active" | "paused" | "failed"; type CronJob = { name: string; expression: string; lastRun: string; nextRun: string; duration: string; status: CronStatus; };
Behavior notes
- Entirely static; no client-side interactivity, sorting, or live re-scheduling. This is a status display, not a job editor.
- expression is rendered verbatim in a monospace <code> chip; there is no cron-syntax validation or human-readable translation of the expression.
- Status badge color is fixed by status value (active=emerald, paused=muted, failed=red) and is not configurable beyond changing status.
- lastRun and nextRun are plain display strings (a mix of relative text like "6 min ago" and absolute timestamps in the demo data); neither is computed from a real Date and neither will update on its own.
- The table scrolls horizontally on narrow viewports (min-w-[760px] inside an overflow-x-auto wrapper) rather than reflowing into stacked cards.
More DevTools Blocks
View all →api-endpoints-sample-call
API Endpoints With Sample Call
Reference list of API endpoints paired with a live sample request and response panel.
cicd-pipeline-status
CI/CD Pipeline Status
Recent CI/CD pipeline runs with per-stage status chips and overall run badges.
code-diff-viewer
Code Diff Viewer
Unified code diff panel with a file header change summary and colored addition/deletion lines.
keyboard-shortcuts-reference
Keyboard Shortcuts Reference
Grouped keyboard shortcut reference with keycap-styled key combos.
performance-waterfall
Performance Waterfall
Network request waterfall chart with cascading timing bars colored by duration.
service-health-board
Service Health Board
Infrastructure status board with a live summary strip and per-service uptime, latency, and health.