animated

Cron

A live, character-based preview of a cron schedule, showing matching minute and calendar positions.

Install

pnpm add @fractaldesign/machines-ui
import '@fractaldesign/machines-ui/style.css';
import { GraphCron } from '@fractaldesign/machines-ui';

Preview

[ EVERY 15 ]
Cron timeline. Expression: */15 * * * *. 8 runs.
<GraphCron title="WEEKDAYS" expr="0 9 * * 1-5" count={8} />

Props

PropTypeDefaultDescription
title* string —Caption drawn on the top edge as `[ TITLE ]`.
expr* string —Standard 5-field cron expression: `min hour dom mon dow`.
count number 8Number of next runs to render on the tick timeline. Default 8.
baseTime number —Base time as ms since epoch; next runs are computed from this point. Default now.
cols number 60Scene width in characters. Default 60.
rows number 12Scene height in rows. Default 12.
animated boolean trueAnimate the tick highlight. Default true. Reduced motion freezes on first run.
speedMs number 220Milliseconds per tick. Default 220.
label string ''Caption rendered muted under the timeline.
class string ''

API

  • class forwarded to the outer element
  • motion runs live; set animated={false} to freeze
  • a11y honours prefers-reduced-motion

Types

NameKindDescription
ParsedCroninterface
RunRowinterface
Seginterface

Theming

CSS custom properties this component reads.

  • --graph-accent
  • --graph-accent-2
  • --graph-accent-3
  • --text-muted
  • --text-primary
  • --text-secondary

Related

Built from

src/lib/components/animated/GraphCron.svelte

machines-ui