Agent schedulePro
When an agent runs on its own: plain words or cron, a time zone, and the next five runs in that zone.
On this page
ProPlain words or cron, a time zone and the next five runs in that zone.
Installation
Usage
import { AgentSchedule } from "@/components/ui/chatcn/pro/agent-schedule"
<AgentSchedule value={schedule} onValueChange={setSchedule} />Plain words cover the schedules people write: every 15 minutes, every hour, every day or weekday at a time, every Monday at a time, on the 1st at a time. Anything else switches to cron. Runs are worked out in the chosen zone, daylight saving included.
Examples
States
ProEvery 15 minutes, monthly and paused.
Props
| Prop | Type | Notes |
|---|---|---|
value, defaultValue | { cron, timeZone, enabled } | Controlled or not |
onValueChange | (value) => void | Called with a valid cron only |
timeZones | string[] | IANA zones offered |
count | number | Next runs shown. Default 5 |
Accessibility
- An invalid entry marks the field invalid and says how to write one that works.
- Enter applies without submitting a surrounding form, and IME composition is respected.