Skip to content
Sign in
AgentsAgent scheduleMenu

Agent schedulePro

When an agent runs on its own: plain words or cron, a time zone, and the next five runs in that zone.

ProPlain words or cron, a time zone and the next five runs in that zone.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/agent-schedule

Usage

tsx
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

PropTypeNotes
value, defaultValue{ cron, timeZone, enabled }Controlled or not
onValueChange(value) => voidCalled with a valid cron only
timeZonesstring[]IANA zones offered
countnumberNext 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.