Schedule Targets

Use one logical schedule to trigger several contextual executions. Targets are useful when the same intent must run for different timezones, markets, tenants, regions, stores, or downstream routes.

The core idea

A normal schedule answers one question: when should this webhook run? A targeted schedule also answers: which execution context is this occurrence for?

Example

Send at 9am local time in Paris, London, Moscow, and Perth.

This is still one product-level schedule. rrule.net computes each local occurrence and includes the matching target in the webhook payload. Your app, n8n workflow, or email provider decides how to route each target.

Why timezone alone is not enough

NeedTimezone onlyTarget context
Two markets share a timezoneParis and Berlin both map to Europe/Paris.Use target ids such as paris and berlin.
Route to a downstream audienceTimezone does not identify a CRM or email segment.Add metadata such as segmentId or market.
Run one workflow for several systemsSlack, email, and CRM may use the same time.Add metadata such as channel.

Create explicit targets

API clients can create targets directly. Each target has a stable id, label, timezone, schedule input or recurrence JSON, and optional metadata.

POST /v1/schedules
Authorization: Bearer rrule_live_...
Content-Type: application/json

{
  "name": "9am local market sends",
  "timezone": "UTC",
  "targets": [
    {
      "id": "paris",
      "label": "Paris audience",
      "input": "Every day at 9am",
      "timezone": "Europe/Paris",
      "metadata": {
        "market": "fr",
        "segmentId": "brevo-fr"
      }
    },
    {
      "id": "perth",
      "label": "Perth audience",
      "input": "Every day at 9am",
      "timezone": "Australia/Perth",
      "metadata": {
        "market": "au",
        "segmentId": "brevo-au"
      }
    }
  ],
  "webhook": {
    "url": "https://example.com/webhooks/rrule"
  }
}

Webhook payload

Untargeted schedules keep the existing payload shape. Targeted schedules add a target object and expose the target id in headers.

{
  "schedule_id": "6b02511c-d936-42cf-932f-cb1ce3832a4c",
  "schedule_name": "9am local market sends",
  "execution_id": "148bdd21-39af-45a6-8f7f-ea6b40ca39a4",
  "scheduled_for": "2026-06-04T07:00:00+00:00",
  "executed_at": "2026-06-04T07:00:02.173Z",
  "timezone": "Europe/Paris",
  "input": {
    "type": "targets",
    "value": "9am local market sends"
  },
  "target": {
    "id": "paris",
    "label": "Paris audience",
    "timezone": "Europe/Paris",
    "metadata": {
      "market": "fr",
      "segmentId": "brevo-fr"
    }
  }
}
X-RRule-Target-Id: paris

Natural-language targets

When an input clearly describes one schedule running in several local contexts, rrule.net can infer targets automatically. Explicit API targets remain the deterministic path when you already know your routing metadata.

Send every day at 9am local time in Paris, London, Moscow, and Perth
A 9h localement, chaque jour, à Paris, Londres, Moscou et Perth
Run maintenance checks at 02:00 local time for Paris and Perth datacenters
At 9am on weekdays, notify Slack, email, and CRM

Good target metadata

Keep metadata small and routing-oriented. It should help your receiver decide what to do, not duplicate your full business database.

  • market or region
  • segmentId or audience
  • storeId, tenant, or datacenter
  • channel when one schedule routes to several downstream systems

Targets are especially useful with workflow tools such as n8n, where downstream branches can route by target id, timezone, or metadata.