Event triggers allow you to run Jobs from your own code (or your other Jobs)
Send an event and any Jobs that subscribe to that event will get triggered.
name
. They will only get triggered when an event with that name are sent.
z.any()
as your schema, and then later on you can add more strict validation. See our Zod guide for more information.
client.sendEvent()
to send an event from your own code. View the SDK reference.
io.sendEvent()
to send events from inside a Job run, to trigger another. View the SDK reference.
status == "ACCEPTED"
, and it would also match if status == "REJECTED"
.