Scheduled Queue

Scheduled Queue is a copy-paste React component that stops scheduled campaign sent at 3am before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/scheduled-queue
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsScheduled campaign sent at 3am

Was this component page useful?

How do I install Scheduled Queue?

pnpm dlx shadcn@latest add @bollard/scheduled-queue

The files land in your project. They're yours to edit.

How do I use Scheduled Queue in React?

scheduled-queue-usage.tsx
import { hourIn, nextHourIn, ScheduledQueue, type ScheduledItem } from "@/components/ui/scheduled-queue"

<ScheduledQueue
  items={items}
  onCancel={(id) => (setLog(`Cancelled “${title(id)}”.`), drop(id))}
  onSendNow={(id) => (setLog(`Sent “${title(id)}”.`), drop(id))}
  onReschedule={(id, at) => {
    setLog(`Moved “${title(id)}”.`)
    setItems((list) => list?.map((i) => (i.id === id ? { ...i, at } : i)))
  }}
/>

What input mistakes does Scheduled Queue catch?

  • Time left before each send, and the last-chance window before cutoff
  • Sends locked in by the provider, with cancel disabled
  • Sends landing in quiet hours (default 22:00–07:00) in the audience's zone, with a move-to-9:00 fix
  • Missed or overdue sends, with Send now
  • Reschedule times in the past

What props does Scheduled Queue accept?

ScheduledQueue props
PropTypeDefault
items* (required)

Scheduled sends to list.

ScheduledItem[]—
onCancel* (required)

Cancels a send. May return a Promise; a rejection shows an error.

(id: string) => void | Promise<void>—
onReschedule* (required)

Moves a send to a new time. May return a Promise.

(id: string, at: Date) => void | Promise<void>—
onSendNow

Offered on items whose time has passed without sending.

(id: string) => void—
lastChance

How long before the cancel cutoff a row turns into a last-chance warning, in ms.

number5 * 60_000
cutoff

Items lock this many ms before sending (the provider is preparing them) and can no longer be cancelled.

number60_000
quietHours

Quiet hours in the item's time zone, e.g. 22 → 7.

{ start: number; end: number }{ start: 22, end: 7 }
fixHour

The hour the one-tap quiet-hours fix moves an item to.

number9
locale

Locale for times and countdowns.

string—
lastChanceText

Templates: `{left}`, `{time}`, `{zone}`, `{ago}` are filled in.

string"Last chance · {left} left to cancel"
lockedText

Shown once a send can no longer be cancelled.

string"Locked in · sending {left}"
sendingText

Shown while a send is going out.

string"Going out now"
overdueText

Shown for a send that missed its time.

string"Was due {ago} and hasn't gone out"
quietText

Warning for a send landing in quiet hours.

string"Lands at {time} in {zone}"
fixLabel

Label of the move-to-a-sane-hour fix.

string"Move to {time}"
sendNowLabel

Label of the Send now button.

string"Send now"
rescheduleLabel

Label of the Reschedule button.

string"Reschedule"
cancelLabel

Label of the Cancel button.

string"Cancel"
saveLabel

Label of the save-new-time button.

string"Save"
pastWarning

Shown when a new time is in the past.

string"That time has already passed."
emptyText

Shown when nothing is scheduled.

string"Nothing scheduled."
countdownText

Countdown chip; `{time}` is filled in ("in {time}").

string"in {time}"
missedLabel

Chip on an item whose time passed without sending.

string"Missed"
localZoneText

Zone name when an item has no `timeZone`.

string"your time zone"
newTimeLabel

Accessible name of the reschedule field; `{title}` is filled in.

string"New time for {title}"
lastChanceAnnouncement

Announced once when a row enters its last-chance window or locks; `{title}` is filled in.

string"Last chance to cancel {title}."
lockedAnnouncement

Announced when a send locks in.

string"{title} is locked in and can no longer be cancelled."

* required. Also accepts the native props of <ul> (className, aria-*, data-*…), passed through to it.

How is Scheduled Queue accessible?

  • Last-chance and locked changes announced in a polite live region, not every tick
  • Reschedule input has an aria-label, autoFocus, aria-invalid for past times, and Escape to cancel
  • Errors use role=alert; locked rows disable Cancel/Reschedule with a lock icon and text
  • Row highlight animation is skipped under reduced motion

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

This is a UX guard rail. Enforce on the server: Enforce the cancel cutoff and reject past send times on the server; the provider's lock is the source of truth.

  • Quiet hours are judged in the zone you give each item; mixed audiences need splitting
  • Cutoff and lock state are as you configure them, not read from the provider
  • Countdowns use the device clock

What expensive mistakes does Scheduled Queue stop?

Scheduled campaign sent at 3am

Also known as

schedule send · scheduled posts · campaign · newsletter · queue · cron · send later · whatsapp broadcast

Field type

What dependencies does Scheduled Queue require?

Scheduled Queue facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameScheduled Queue
Registry identifier@bollard/scheduled-queue
Install commandnpx shadcn@latest add @bollard/scheduled-queue
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Scheduled Queue

How does Scheduled Queue handle date and time accuracy?

Scheduled Queue catches scheduled campaign sent at 3am. Validates calendar constraints: Time left before each send, and the last-chance window before cutoff, Sends locked in by the provider, with cancel disabled, Sends landing in quiet hours (default 22:00–07:00) in the audience's zone, with a move-to-9:00 fix, Missed or overdue sends, with Send now, Reschedule times in the past. Limitation: match scheduled-queue with server timezone.

How do I install scheduled-queue with shadcn?

Run `npx shadcn@latest add @bollard/scheduled-queue`. Sources added: registry/default/scheduled-queue/scheduled-queue.tsx. Package requirements: lucide-react.

What props customize Scheduled Queue?

Scheduled Queue accepts `items`, `onCancel`, `onReschedule`, `onSendNow`, `lastChance`. Configures schedule send, scheduled posts, campaign behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of scheduled-queue?

Quiet hours are judged in the zone you give each item; mixed audiences need splitting. Cutoff and lock state are as you configure them, not read from the provider. Countdowns use the device clock Server requirement: Enforce the cancel cutoff and reject past send times on the server; the provider's lock is the source of truth.

How does Scheduled Queue meet accessibility guidelines?

Last-chance and locked changes announced in a polite live region, not every tick. Reschedule input has an aria-label, autoFocus, aria-invalid for past times, and Escape to cancel. Errors use role=alert; locked rows disable Cancel/Reschedule with a lock icon and text. Row highlight animation is skipped under reduced motion. Minimizes errors: scheduled send went out wrong time, missed scheduled post.

Which components pair with Scheduled Queue?