> ## Documentation Index
> Fetch the complete documentation index at: https://docs.smartwpplugins.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Scheduling

> Choose the day a preset goes live and the day it stops selling

export const Media = ({kind = 'Screenshot', children}) => <div style={{
  display: 'flex',
  flexDirection: 'column',
  alignItems: 'center',
  justifyContent: 'center',
  gap: '0.5rem',
  textAlign: 'center',
  padding: '2.75rem 1.5rem',
  margin: '1.5rem 0',
  border: '1.5px dashed #b4c0d4',
  borderRadius: '0.75rem',
  background: 'rgba(148, 163, 184, 0.07)'
}}>
    <span style={{
  fontSize: '1.5rem',
  lineHeight: 1
}}>
      {kind === 'Video' ? '▶️' : '🖼️'}
    </span>
    <span style={{
  fontSize: '0.75rem',
  fontWeight: 700,
  letterSpacing: '0.08em',
  textTransform: 'uppercase',
  color: '#64748b'
}}>
      {kind} pending
    </span>
    <span style={{
  fontSize: '0.875rem',
  color: '#64748b',
  maxWidth: '34rem'
}}>
      {children}
    </span>
  </div>;

export const Pro = () => <span style={{
  display: 'inline-flex',
  alignItems: 'center',
  verticalAlign: 'middle',
  fontSize: '0.68em',
  fontWeight: 700,
  letterSpacing: '0.07em',
  lineHeight: 1,
  padding: '0.32em 0.55em',
  borderRadius: '0.3em',
  background: '#f5b301',
  color: '#2b2000',
  marginLeft: '0.4em',
  textTransform: 'uppercase'
}}>
    Pro
  </span>;

<Info>
  Scheduling is a Pro feature. On the free build a preset goes live the moment you save it with the status switch on, and never ends on its own. The date controls are visible but locked.
</Info>

A schedule is two dates and a decision about what happens at the end of one.

<Media>The Preset details card with the publish date popover open, showing the calendar and time row</Media>

## The start date

Set a **publish date** in the future and the preset reads as **Scheduled** until that moment arrives. Following its link before then meets the *not available yet* notice.

A preset with no date, or one whose date has passed, is live as soon as its status switch is on.

Both ends carry a **time** as well as a day. A date left without a time falls to the sensible end of its day — a publish date opens its day, an end date closes it — so if you only care about the day you never have to think about the clock.

<Tip>
  This is what lets a campaign link be built and approved weeks early, then open on its own at 9am on launch day without anyone being awake for it.
</Tip>

## The end date

Set **Ends on** and the preset stops selling at that moment. It reads as **Inactive** afterwards.

A seasonal offer closes itself instead of relying on someone remembering.

## What happens when it ends

An ended preset is not a broken link. What a customer meets is your choice, set store-wide under **Settings → Cart behavior** and overridable per preset:

| Choice                    | What the customer gets          | Key          |
| ------------------------- | ------------------------------- | ------------ |
| Leave them where they are | Sent to the cart, with a notice | `leave`      |
| Deactivate the preset     | Sent to the cart, with a notice | `deactivate` |
| Redirect                  | Sent to an address you choose   | `redirect`   |

Alongside it, **Tell the customer why** decides whether they get a notice at all. It defaults to **on**, and that default is deliberate: a customer who follows a link they were given, arrives at an empty cart, and is told nothing has been told your store is broken.

Turn it off once you have somewhere better to send them — typically alongside **Redirect**, pointing at a landing page that explains the offer has closed and shows what else you sell.

<Media>The Availability card showing the end date, the end-of-life choice, and the notice switch</Media>

## Putting an ended preset back on sale

Clearing the end date brings it back. Two ways in:

* The **Ends on** field in the editor — clear it and save.
* **Clear end date** in the listing's row menu, which only appears on presets that have one.

<Note>
  Clearing an end date is gated exactly like setting one. On the free build a preset that ended stays ended — moving to the free build must never put a link back on sale that your own schedule had stopped.
</Note>

## Status is derived, never stored

The Active / Scheduled / Inactive badge is computed from the status switch, the dates and the caps every time it is read. Nothing runs on a cron to flip it, and nothing can go stale.

| Badge     | Means                                                                            |
| --------- | -------------------------------------------------------------------------------- |
| Active    | Switch is on, the start date has passed, the end date has not, caps are not full |
| Scheduled | Switch is on, and the start date is in the future                                |
| Inactive  | Switch is off, the end date has passed, or a cap is full                         |

That is why a preset can go live at 9am on a site nobody visited overnight: there is nothing to run.

## Settings reference

| Setting                     | Level  | Key                  | Default      |
| --------------------------- | ------ | -------------------- | ------------ |
| Publish date                | Preset | `created_at`         | Now          |
| Ends on                     | Preset | `end_at`             | Empty        |
| When a preset stops selling | Store  | `unavailable_action` | `deactivate` |
| When a preset stops selling | Preset | `unavailable_action` | `global`     |
| Redirect address            | Preset | `unavailable_url`    | Empty        |
| Tell the customer why       | Store  | `unavailable_notice` | On           |
| Tell the customer why       | Preset | `unavailable_notice` | On           |
