From 4c2bc76c1f6fb45b81acf762c9c30a973305293a Mon Sep 17 00:00:00 2001 From: isshaddad Date: Fri, 27 Feb 2026 13:20:28 -0500 Subject: [PATCH] adds deduplication key clarification --- 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 84985708f64..f4997beb310 100644 --- a/docs/tasks/scheduled.mdx +++ b/docs/tasks/scheduled.mdx @@ -176,7 +176,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. | @@ -202,6 +202,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