Skip to content

Commit d892261

Browse files
committed
date object payload note
1 parent d893b26 commit d892261

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-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

0 commit comments

Comments
 (0)