Time-Window Notifications with UTC Conditions in Echobell

Use Echobell's built-in UTC time variables to filter notifications by business hours, weekends, or maintenance windows. Includes ready-to-use condition recipes.

Time-Window Notifications with UTC Conditions in Echobell

Echobell's built-in UTC time variables let you restrict notifications to specific time windows—business hours, on-call shifts, maintenance windows—directly in channel Conditions. No external filtering layer needed.

Prerequisites: Conditions, Templates, Webhook, Email Triggers.

Available UTC variables

These are read-only, always available, and computed in UTC:

  • timezone (always "UTC"), now/iso, epochMs, epochSeconds
  • year, month (1–12), monthName
  • dayOfMonth (1–31)
  • dayOfWeek (0–6, Sunday = 0), dayOfWeekName
  • hour (0–23), minute (0–59), second (0–59)
  • date (YYYY-MM-DD), time (HH:mm:ss)

Use them directly in Conditions (no {{ }}). Use with {{ }} in Templates.

Condition recipes

Weekdays during business hours

hour >= 9 && hour < 17 && dayOfWeek >= 1 && dayOfWeek <= 5

Weekends only

dayOfWeek == 0 || dayOfWeek == 6

Off-hours (nights and weekends)

(hour < 9 || hour >= 17) || dayOfWeek == 0 || dayOfWeek == 6

Maintenance window (Saturdays 01:00–03:00)

dayOfWeek == 6 && hour >= 1 && hour < 3

First day of each month at the top of the hour

dayOfMonth == 1 && minute == 0

End-of-quarter business hours (Mar/Jun/Sep/Dec)

(month == 3 || month == 6 || month == 9 || month == 12) && hour >= 9 && hour < 17 && dayOfWeek >= 1 && dayOfWeek <= 5

Combining time with content filters

Time conditions compose with data variables using standard operators:

  • Off-hours escalations for high-severity only:
    ((hour < 9 || hour >= 17) || dayOfWeek == 0 || dayOfWeek == 6) && (severity == "high" || severity == "critical")
  • Production environment, weekdays only:
    environment == "production" && dayOfWeek >= 1 && dayOfWeek <= 5

Conditions are plain expressions—do not wrap them in {{ }}. See Conditions → Supported Operators.

Using time variables in templates

The same variables work in templates with {{ }}, useful for audit records and human-readable receipts:

Sent at {{date}} {{time}} {{timezone}}
Today is {{dayOfWeekName}}, {{monthName}} {{dayOfMonth}}, {{year}}
Epoch: {{epochSeconds}}

Mix with data from Webhook or Email Triggers:

{{service}} {{status}} at {{time}} ({{timezone}})

Notes

  • All system variables are UTC. If your team spans timezones, account for the offset when setting hour ranges.
  • Start with a simple time window, then layer in content filters once it's working.
  • Leave a short description on the channel explaining the condition logic (e.g. "Weekdays 09–17 UTC; off-hours only for high severity").

Next steps

  • Add a time-window condition to an existing channel: Conditions
  • Customize notification content with variables: Templates
  • Create separate channels for business hours vs. on-call windows
  • Set on-call channels to Calling notification type for off-hours urgency

By

Nooc

on

Nov 6, 2025