---
title: "Quartz Integration"
description: "Learn how to send check-ins for your Quartz jobs."
url: https://docs.sentry.io/platforms/java/guides/spring/integrations/quartz/
---

# Quartz Integration | Sentry for Spring

Sentry's [Quartz](http://www.quartz-scheduler.org/) integration is provided through `SentryJobListener` which you have to add to your scheduler instance.

The Quartz integration will be configured automatically if you're using `spring-boot-starter-quartz` with either the `sentry-spring-boot-starter` or the `sentry-spring-boot-jakarta-starter` integration. However, you still have to specify the monitor slug as shown below.

Check-ins may also be [sent manually](https://docs.sentry.io/platforms/java/crons.md) or if you're using Sentry's Spring Boot integration you can send send check-ins for your `@Scheduled` tasks by using our [`@SentryCheckIn` annotation](https://docs.sentry.io/platforms/java/guides/spring-boot/crons.md).

## [Install](https://docs.sentry.io/platforms/java/guides/spring/integrations/quartz.md#install)

To install use:

```groovy
plugins {
  id "io.sentry.jvm.gradle" version "6.4.0"
}
```

For other dependency managers, check out the [central Maven repository](https://search.maven.org/artifact/io.sentry/sentry-quartz).

## [Set Up](https://docs.sentry.io/platforms/java/guides/spring/integrations/quartz.md#set-up)

You have to provide the monitor slug either

* when building a Quartz `JobDetail` instance
* or when building a Quartz `Trigger` instance

To do so, you have to add an entry to the jobs data map:

```java
import io.sentry.quartz.SentryJobListener;

// you can set the monitor slug on the job detail
JobDetailFactoryBean jobDetailFactory = new JobDetailFactoryBean();
jobDetailFactory.setJobDataAsMap(Collections.singletonMap(SentryJobListener.SENTRY_SLUG_KEY, "<monitor-slug>"));

// you can also set the monitor slug on the trigger
SimpleTriggerFactoryBean trigger = new SimpleTriggerFactoryBean();
trigger.setJobDataAsMap(Collections.singletonMap(SENTRY_SLUG_KEY, "monitor_slug_simple_trigger"));
```

Setting the monitor slug on the `Trigger` will override what is set on the `JobDetail`. This also means you can set up a separate monitor per `Trigger`.

Setting a global job listener using a `SchedulerFactoryBeanCustomizer` in Spring Boot, will override the listener set by Sentry. For Sentry to work properly, you need to add a new `SentryJobListener` instance to the global job listeners.
