# New Cron Job block

> New cron job sheet with schedule presets, cron validation and a next runs preview

Create form for a scheduled command: preset chips, a cron input read back in plain words, owner, service and cluster pickers, and a first run time. ReUI Badge; shadcn Sheet, ToggleGroup, InputGroup, Select, Switch. Cron job form, task scheduler.

- Type: Pro block
- Category: [Sheet](https://web.dev.reui.io/blocks/application/sheet.md)
- Page: https://web.dev.reui.io/blocks/application/sheet/sheet-13
- Docs (Base UI): https://ui.shadcn.com/docs/components/base/sheet.md
- Docs (Radix UI): https://ui.shadcn.com/docs/components/radix/sheet.md
- MCP: `get_block("sheet-13")`
- Built with: Avatar, Badge, Button, Field, Input, Input Group, Select, Sheet, Switch, Toggle Group
- Installs with a ReUI Pro or Ultimate license; setup: https://web.dev.reui.io/docs/license-setup

## Best for

A blank job form with 6 schedule presets, a cron line read back in words, the next 3 run times and a Create that focuses the first error

## Agent notes

- `handleCreate` only raises a `toast` with the job name and saves nothing; send the `JobDraft` to your API there
- `NEW_JOB_DRAFT` defaults the service, cluster and owner (`CURRENT_USER_ID`) from the sample `SERVICES`, `CLUSTER_OPTIONS` and `PEOPLE`
- Next runs and First run are computed from the fixed `REFERENCE_MS`, not the current clock; replace it for real times

## When not to use

- A form that edits an existing job rather than creating one: use [Cron Job Detail](https://web.dev.reui.io/blocks/application/sheet/sheet-12.md) (`get_block("sheet-12")`)
- A create panel built from a title, description and inline pickers: use [Create Project](https://web.dev.reui.io/blocks/application/sheet/sheet-1.md) (`get_block("sheet-1")`)

## Third-party libraries

- Sonner v2: [API reference](https://sonner.emilkowal.ski/toast), [docs](https://sonner.emilkowal.ski/getting-started)

## Install

```bash
npx shadcn@latest add @reui/sheet-13
```

## About Sheet blocks

### When to use

- Record detail opened over a list or table: a ticket, metric, cron job, audit event, deploy, SLO or data source
- Create and edit forms in a side panel for a project, cron job, firewall rule, SLO or data connection
- Utility panels for help guides, keyboard shortcuts, an AI assistant, comments, notifications or view settings

### When not to use

- A bare side panel with your own header, body and footer, nothing prebuilt: use [Sheet](https://web.dev.reui.io/components/sheet.md) (`get_component("sheet")`)
- A persistent sidebar or navigation layout that stays around every page: use the [App Shell blocks](https://web.dev.reui.io/blocks/application/app-shell.md)
- An assistant conversation that fills the whole page rather than a side panel: use the [AI Chat blocks](https://web.dev.reui.io/blocks/ai-agents/ai-chat.md)

### Agent notes

- Each root renders a demo `SheetTrigger` button and opens on mount via `defaultOpen` or a `useState` seeded true; start it closed in your app
- Each `SheetContent` className floats it inset with `inset-y-4`, `right-4` and `rounded-xl` and sets its own width; resize it there, not in the primitive
- Each page.tsx only centers the trigger in a `min-h-svh` main with an `sr-only` h1; render the root component alone inside your page

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