Skip to content

Commit ab4b50b

Browse files
authored
chore(docs): Add clarifications for delay semantics and payload handling (#2928)
Adds documentation notes clarifying that: - delayed runs execute on the current deployment version - guidance for Date objects in payloads - static IP availability - version locking behavior for delayed runs
1 parent 1859fd0 commit ab4b50b

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

docs/triggering.mdx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,8 @@ Runs that are delayed and have not been enqueued yet will display in the dashboa
707707

708708
<Note>
709709
Delayed runs will be enqueued at the time specified, and will run as soon as possible after that
710-
time, just as a normally triggered run would.
710+
time, just as a normally triggered run would. They execute on the currently deployed version when
711+
they start, not the version that was active when they were enqueued.
711712
</Note>
712713

713714
You can cancel a delayed run using the `runs.cancel` SDK function:
@@ -733,6 +734,12 @@ The `delay` option is also available when using `batchTrigger`:
733734
await myTask.batchTrigger([{ payload: { some: "data" }, options: { delay: "1h" } }]);
734735
```
735736

737+
<Note>
738+
If your payload contains Date objects, pass them directly rather than manually stringifying with
739+
`JSON.stringify()`. The SDK handles Date serialization automatically. If you need to stringify
740+
manually, convert Dates to ISO strings first (e.g., `date.toISOString()`).
741+
</Note>
742+
736743
### `ttl`
737744

738745
You can set a TTL (time to live) when triggering a task, which will automatically expire the run if it hasn't started within the specified time. This is useful for ensuring that a run doesn't get stuck in the queue for too long.
@@ -1048,7 +1055,7 @@ You can override the default region when you trigger a run:
10481055
await yourTask.trigger(payload, { region: "eu-central-1" });
10491056
```
10501057

1051-
If you don't specify a region it will use the default for your project. Go to the "Regions" page in the dashboard to see available regions or switch your default.
1058+
If you don't specify a region it will use the default for your project. Go to the "Regions" page in the dashboard to see available regions or switch your default. Static IP addresses are also available on the Regions page for paid plans.
10521059

10531060
The region is where your runs are executed, it does not change where the run payload, output, tags, logs, or are any other data is stored.
10541061

docs/versioning.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ Versions numbers are incremented each time a new version is created for that dat
2424

2525
When a task run starts it is locked to the latest version of the code (for that environment). Once locked it won't change versions, even if you deploy new versions. This is to ensure that a task run is not affected by changes to the code.
2626

27+
Delayed runs are locked to the version that's active when they begin executing, not when they're enqueued.
28+
2729
### Child tasks and version locking
2830

2931
Trigger and wait functions version lock child task runs to the parent task run version. This ensures the results from child runs match what the parent task is expecting. If you don't wait then version locking doesn't apply.

0 commit comments

Comments
 (0)