Background jobs
How cascade handles background jobs
Background jobs tool of choice
Cascade uses Trigger.dev as its background job tool of choice. Trigger.dev is a simple, reliable, and easy-to-use tool that allows you to schedule and run background jobs in a few simple steps.
What is a background job
A background job is a task that is executed outside the normal flow of your application. It is typically used to perform tasks that are not time-sensitive, such as sending emails, sending notifications or even running a generation with AI.
Cascade uses background jobs to send Slack notifications so if you want to get notified on new users or on new payments - you need to enable Slack integration on Trigger.dev platform.
In general job definitions are pretty simple and should serve you as a good example if you want to create your own jobs.
That is the definition of a job:
And that’s how you invoke a job:
How to use Trigger.dev with Cascade
First, you need to create a Trigger.dev account. Once you have an account, you can create a new project and get your API key.
Populate the related environment variables in your .env
file: