Changelog #4

·

Disable and delete jobs

Eric Allam

Eric Allam

CTO, Trigger.dev

Image forDisable and delete jobs

You can now disable jobs in your code by setting the enabled option to false:


_10
client.defineJob({
_10
id: "example-job",
_10
name: "Example Job",
_10
version: "0.1.0",
_10
trigger: eventTrigger({ name: "example.event" }),
_10
enabled: false,
_10
run: async (payload, io, ctx) => {
_10
// your job code here
_10
},
_10
});

Which will show the job as disabled in the dashboard:

disabled job

Once you've disabled your job, you can delete it from the dashboard:

delete job

For more detailed information, checkout our documentation on managing Jobs.

Ready to start building?

Build and deploy your first task in 3 minutes.

Get started now
,