What we take care of for you:
- We make it possible to run long-running Jobs on serverless platforms that have short timeouts (e.g. 30 seconds).
- We provide an SDK for building Jobs in your codebase, triggered by various sources such as events, scheduled events, and webhooks.
- We provide an orchestration platform for running Jobs in your codebase.
- We provide out-of-the-box Integrations with popular services such as Slack, OpenAI, GitHub and more, which vastly simplifies the process interacting with 3rd-party services.
- We handle OAuth for you
- We provide a nice UI for viewing and debugging your Jobs.
What you take care of:
- You write your Jobs in your codebase.
- You get a Trigger.dev API Key and add it to your codebase.
- You deploy your codebase.
How it works
To get an idea of how Trigger.dev works, let’s take a look at a simple Job that sends a Slack message when a GitHub issue is labelled ascritical
:
run
function supplied to the Job
constructor with the webhook payload. This gives you the following advantages over traditional webhooks:
- We will automatically register the webhook with GitHub for you, and verify the payload signature.
- We provide a nicely typed
event
payload to yourrun
function, so you don’t have to setup webhook payload types. - If your server isn’t running, we will wait until it’s back online before attempting to run the Job.
- It is very easy to test your Job locally using our Test Run feature.
- We automatically handle the OAuth flow for you, so you don’t have to worry about setting up a Slack app and dealing with credentials in your code (see our Authentication guide for more details).
- We will automatically retry the request if the Slack API returns an error.
- We provide a nicely typed
response
object from yourpostMessage
function, so you don’t have to setup Slack API types.
Why use Trigger.dev?
Apart from the reasons mentioned above, there are a few other reasons why you might want to use Trigger.dev:- You want to access your database or other internal services from your Jobs, without having to expose them to the internet.
- You want to colocate your Jobs with your code, so you can deploy them together in one atomic unit.
- You want to build event-driven architectures without having to manage any complicated orchestration infrastructure.
- You want to add in delays or retries to your Jobs, without having to worry about managing a queue.
Architecture
Below is a simplified architecture diagram of how Trigger.dev works: