
Description
dev/sdk package. Tasks are functions that can run for a long time and are resilient to failure. You define them in files under your /trigger directory, using task() or schemaTask(), each with a unique id and a run function. The run function receives the payload and a context object, which carries details such as the attempt number. Its return value must be JSON serialisable. The skill covers retries, waits, queues and the other task options. dev/sdk. dev/core. The setup section gives a hello-world example. It defines a task with the id hello-world, logs the message from the payload together with the attempt number, and returns a success object. dev. 1K installs, and its security audits all pass.…
Highlights
- task() and schemaTask() definitions
- Run function with payload and context
- Retries, waits and queues
- Always import from @trigger.dev/sdk
- Hello-world setup example
Ratings & Reviews
No ratings yet
Be the first to rate trigger-tasks.
People also visit

upstash-workflow
Upstash Workflow/QStash handlers, triggers, durable steps and async fan-out
trigger-tasks FAQ
What is a Trigger.dev task?
A function that can run for a long time with strong resilience to failure, defined in a file under your /trigger directory.
What does the run function receive?
The payload and a context object. The context includes the attempt number, for example.
What must the return value be?
JSON serialisable.
Which package should I import from?
@trigger.dev/sdk. The skill says not to import from @trigger.dev/sdk/v3, a deprecated alias, or from @trigger.dev/core.
Does it cover retries and queues?
Yes. It covers retries, waits, queues and the related task options.
What are the best trigger-tasks alternatives?
Popular alternatives to trigger-tasks include trigger-setup, trigger-config and python-background-jobs. See all trigger-tasks alternatives















