# Weekend exclusion configurable

- **Pattern:** `ab-000608` (`campaign-orchestration-sequencing.cadence-spacing.weekend-exclusion`)
- **Severity:** low
- **Lifecycle:** active
- **Last modified:** 2026-04-18
- **Canonical URL:** https://auditbuffet.com/patterns/ab-000608
- **License:** CC-BY-4.0 — attribute to AuditBuffet Pattern Catalog (https://auditbuffet.com/patterns/ab-000608)

## Why it matters

A 2-day follow-up configured Friday lands Sunday when `exclude_weekends` is missing, so the prospect sees your nurture step buried under Monday morning inbox triage instead of arriving mid-Tuesday when it was meant to reinforce the initial touch. Campaigns that add calendar days instead of business days collapse sequence cadence across weekends, breaking the carefully-spaced rhythm sales and lifecycle teams designed and reducing the user experience quality of the automation tool itself.

## Severity rationale

Low because weekend sends degrade engagement timing but do not break delivery, billing, or data integrity.

## Remediation

Replace `date.setDate(date.getDate() + delayDays)` with a business-day-aware delay function in the step scheduler. Store the `exclude_weekends` flag on the sequence record and branch on it when computing each step's send time. File: `src/lib/scheduler/delay.ts`.

```ts
function addBusinessDays(start: Date, days: number): Date {
  let result = new Date(start), added = 0
  while (added < days) {
    result.setDate(result.getDate() + 1)
    const dow = result.getDay()
    if (dow !== 0 && dow !== 6) added++
  }
  return result
}
```

## Detection

- **ID:** `weekend-exclusion`
- **Severity:** `low`
- **What to look for:** Check whether sequences can be configured to skip weekend sends entirely. When `exclude_weekends` is enabled, a step with a delay of "2 days" should count only business days. Look for: an `exclude_weekends` option on sequences or steps, a delay-computation function that skips Saturday and Sunday when calculating the send timestamp, and handling for steps scheduled to land on a Saturday or Sunday.
- **Pass criteria:** Sequences have an exclude-weekends option. When enabled, "2-day delays" skip weekends and the step sends on the next weekday. Count the delay-computation functions and enumerate which handle weekend skipping — at least 2 day-of-week values (Saturday=6 and Sunday=0) must be excluded.
- **Fail criteria:** No weekend exclusion option, or the option exists as a flag but no enforcement logic is present in the scheduler.
- **Skip (N/A) when:** The product is consumer-facing and weekend sends are appropriate, or sequences are short enough that weekend timing is irrelevant.
- **Detail on fail:** `"No exclude_weekends option on sequences"` or `"exclude_weekends flag present but delay calculation adds calendar days regardless of weekends"`
- **Remediation:** Implement a business-day delay function:

  ```ts
  function addBusinessDays(startDate: Date, days: number): Date {
    let result = new Date(startDate)
    let added = 0
    while (added < days) {
      result.setDate(result.getDate() + 1)
      const dow = result.getDay()
      if (dow !== 0 && dow !== 6) added++ // Skip Sunday (0) and Saturday (6)
    }
    return result
  }
  ```

---

Taxons: user-experience

HTML version: https://auditbuffet.com/patterns/ab-000608
