Added a note to use batchTrigger() instead of trigger()

This commit is contained in:
James Ritchie
2024-08-14 13:25:06 +01:00
parent e9bdd0c7e5
commit db9163e775
+2
View File
@@ -36,6 +36,8 @@ Triggers a single run of a task with the payload you pass in, and any options yo
If called from within a task, you can use the `AndWait` version to pause execution until the triggered run is complete.
If you need to call `trigger()` on a task in a loop, use [`batchTrigger()`](/triggering#task-batchtrigger) instead which will trigger up to 100 tasks in a single call.
<CodeGroup>
```ts Next.js API route