Skip to content

Schedules

Schedules start Actions and Workflows at set times, on recurring rules and on business-hours calendars.

A schedule is one kind of Trigger.

Contract

  • A schedule is a record in the namespace with an owner Role. Its rule is a cron expression, a named rule such as every.weekday.at8am, or a sentence compiled to one.
  • Each firing is an Action, pending with reason awaitingTime until it is due.
  • Each calendar's working hours, holidays and time zone are Settings. They inherit from Studio to Portfolio to Startup, and a child can only tighten them.
  • Delay windows count on these calendars, so a window of one working day skips the weekend.
  • A firing missed during an outage runs once on recovery, never once per missed slot.
  • The shortest interval is one minute.
  • Pause, resume and skip are Actions, attributed like any other write.

Verbs

VerbObjectEvent
Trigger.createTriggerTrigger.created

Interfaces

Example

TypeScript
import { $ } from 'startup-builder'

// A booking app for dental clinics texts tomorrow's patients at 4pm, clinic time.
// The reminder Workflow starts on this Trigger.
await $.Trigger.create({ schedule: '0 16 * * 1-5 America/Chicago' })