Scheduled SMS

Schedule messages for one-time or recurring delivery.

Overview

Scheduled SMS lets you send messages at a specific future time or on a recurring basis using cron expressions. Useful for appointment reminders, recurring alerts, or time-sensitive notifications in different timezones.

Schedules are managed through the Scheduled page in the dashboard. A background cron job checks for due messages every minute and dispatches them automatically.

One-time schedules

  1. Navigate to Scheduled in the sidebar
  2. Click Schedule SMS
  3. Enter a name, recipients, and message body (or pick a template)
  4. Set Schedule Type to One-time
  5. Pick a date and time in the Send At field
  6. Choose your timezone and click Create Schedule

When the scheduled time arrives, the message is sent and the status changes to completed.

Recurring schedules

  1. Follow the same steps as above
  2. Set Schedule Type to Recurring
  3. Enter a cron expression (5-field format)

Cron expressions use the standard 5-field format:

┌───── minute (0–59)
│ ┌───── hour (0–23)
│ │ ┌───── day of month (1–31)
│ │ │ ┌───── month (1–12)
│ │ │ │ ┌───── day of week (0–6, Sun=0)
│ │ │ │ │
* * * * *

Common examples:

Expression Meaning
*/5 * * * * Every 5 minutes
0 9 * * * Every day at 9:00 AM
0 9 * * 1 Every Monday at 9:00 AM
0 0 1 * * First day of each month at midnight
30 8 * * 1-5 Weekdays at 8:30 AM

After each dispatch, the next run time is automatically recomputed based on the cron expression and timezone.

Pause and resume

Active schedules can be paused from the actions menu. Paused schedules are skipped by the cron job until resumed. Resuming recalculates the next run time.

Timezones

Each schedule has a timezone setting (defaults to UTC). Cron expressions are evaluated in the specified timezone, and the computed next_run_at is stored in UTC for accurate dispatch.

API access

Schedules are stored in the scheduled_sms collection and can be managed via the PocketBase collections API. The server automatically computes next_run_at when records are created or updated.

Create a schedule

POST /api/collections/scheduled_sms/records

Field Type Required Description
name string Yes Schedule name (max 100 characters)
recipients string[] Yes Array of phone numbers in E.164 format
body string Yes Message text (max 1600 characters)
schedule_type string Yes one_time or recurring
scheduled_at datetime Conditional Required for one-time schedules (ISO 8601 UTC)
cron_expression string Conditional Required for recurring schedules (5-field cron)
timezone string No IANA timezone (defaults to UTC)
device_id string No Specific device to use for sending
user string Yes User ID (set automatically in dashboard)

Validate a cron expression

POST /api/sms/validate-cron

// Request
{ "expression": "0 9 * * 1-5", "timezone": "America/New_York" }

// Response (valid)
{ "valid": true, "next_run": "2026-02-24T14:00:00Z" }

// Response (invalid)
{ "valid": false, "error": "invalid cron expression: ..." }

Schedule statuses

Status Description
active Schedule is running and will dispatch at next_run_at
paused Schedule is paused, skipped by the cron job
completed One-time schedule has been dispatched

Related

  • SMS Templates - Save reusable message templates
  • Send SMS - Send messages immediately via API
  • Webhooks - Get notified when scheduled messages are delivered