Skip to content

Commit fed18ad

Browse files
committed
chore: call out uniqueness schedule name
1 parent 7b99668 commit fed18ad

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

docs/content/docs/schedules.mdx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,13 @@ The platform advances the schedule automatically after each cycle. On each advan
104104

105105
Schedules are assigned through the client API. The endpoints use an upsert model: sending the same `name` for the same user or organization updates the existing assignment.
106106

107+
<Callout type="warn">
108+
The schedule `name` acts as a **unique identifier** per user or organization.
109+
Each user (or organization) can only have one active assignment for a given
110+
schedule name. If you send a new assignment with the same name, it replaces the
111+
previous one — including its timing, interval, and data.
112+
</Callout>
113+
107114
### User Schedules
108115

109116
```
@@ -112,7 +119,7 @@ POST /api/client/users/scheduled
112119

113120
| Field | Type | Required | Description |
114121
| -------------- | -------- | -------- | ---------------------------------------------------------- |
115-
| `name` | string | Yes | Schedule name (must match an existing schedule definition) |
122+
| `name` | string | Yes | Schedule name — unique per user (emits as `scheduled.<name>`) |
116123
| `identifier` | array | Yes | Array of `{ externalId, source? }` objects to identify the user |
117124
| `scheduled_at` | datetime | \*\* | Fire time for single schedules |
118125
| `interval` | string | \*\* | Interval for recurring schedules (e.g. `7 days`) |
@@ -129,7 +136,7 @@ POST /api/client/organizations/scheduled
129136

130137
| Field | Type | Required | Description |
131138
| -------------------------- | -------- | -------- | ---------------------------------------------------- |
132-
| `name` | string | Yes | Schedule name |
139+
| `name` | string | Yes | Schedule name — unique per organization (emits as `scheduled.<name>`) |
133140
| `identifier` | array | Yes | Array of `{ externalId, source? }` objects to identify the organization |
134141
| `scheduled_at` | datetime | \*\* | Fire time for single schedules |
135142
| `interval` | string | \*\* | Interval for recurring schedules |

docs/content/docs/sdks/javascript.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ await lunogram.organization.schedule.upsert({
276276

277277
| Field | Type | Required | Description |
278278
| ------------- | ------ | -------- | ------------------------------------------------- |
279-
| `name` | string | Yes | Schedule name (emits as `scheduled.<name>`) |
279+
| `name` | string | Yes | Schedule name — unique per user/organization (emits as `scheduled.<name>`) |
280280
| `identifier` | array | No | User or organization identifier array |
281281
| `scheduledAt` | string | No | ISO 8601 timestamp for first execution |
282282
| `startAt` | string | No | Earliest time the schedule should begin |

0 commit comments

Comments
 (0)