From b8ce6939b697a7452bb3c4b6375df2198ec64ac7 Mon Sep 17 00:00:00 2001 From: Iss <74388823+isshaddad@users.noreply.github.com> Date: Tue, 14 Apr 2026 10:10:04 -0400 Subject: [PATCH] docs: adds deduplication key clarification (#3151) --- docs/tasks/scheduled.mdx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/tasks/scheduled.mdx b/docs/tasks/scheduled.mdx index e3edeee85..cf3e6f050 100644 --- a/docs/tasks/scheduled.mdx +++ b/docs/tasks/scheduled.mdx @@ -188,7 +188,7 @@ These are the options when creating a schedule: | Cron pattern | The schedule in cron format. | | Timezone | The timezone the schedule will run in. Defaults to "UTC" | | External id | An optional external id, usually you'd use a userId. | -| Deduplication key | An optional deduplication key. If you pass the same value, it will update rather than create. | +| Deduplication key | An optional deduplication key. If you pass the same value, it will update rather than create. Scoped per project, not per environment. | | Environments | The environments this schedule will run in. | @@ -214,6 +214,10 @@ const createdSchedule = await schedules.create({ You can create many schedules with the same `task`, `cron`, and `externalId` but only one with the same `deduplicationKey`. + + The deduplication key is **per project**, not per environment. Using the same key in Production and Staging creates a single schedule; the last create/update decides which environment it appears in. For fixed schedules, prefer **declarative** (cron on the task). If using imperative across environments, use a different deduplication key per environment (e.g. include the env name in the key). + + This means you can have thousands of schedules attached to a single task, but only one schedule per `deduplicationKey`. Here's an example with all the options: ```ts