Quartz (quartz
)
The quartz
endpoint provides information about jobs and triggers that are managed by the Quartz Scheduler.
Retrieving Registered Groups
Jobs and triggers are managed in groups.
To retrieve the list of registered job and trigger groups, make a GET
request to /actuator/quartz
, as shown in the following curl-based example:
$ curl 'http://localhost:8080/actuator/quartz' -i -X GET
The resulting response is similar to the following:
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 120
{
"jobs" : {
"groups" : [ "samples", "tests" ]
},
"triggers" : {
"groups" : [ "samples", "DEFAULT" ]
}
}
Retrieving Registered Job Names
To retrieve the list of registered job names, make a GET
request to /actuator/quartz/jobs
, as shown in the following curl-based example:
$ curl 'http://localhost:8080/actuator/quartz/jobs' -i -X GET
The resulting response is similar to the following:
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 137
{
"groups" : {
"samples" : {
"jobs" : [ "jobOne", "jobTwo" ]
},
"tests" : {
"jobs" : [ "jobThree" ]
}
}
}
Retrieving Registered Trigger Names
To retrieve the list of registered trigger names, make a GET
request to /actuator/quartz/triggers
, as shown in the following curl-based example:
$ curl 'http://localhost:8080/actuator/quartz/triggers' -i -X GET
The resulting response is similar to the following:
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 229
{
"groups" : {
"samples" : {
"paused" : false,
"triggers" : [ "3am-weekdays", "every-day", "once-a-week" ]
},
"DEFAULT" : {
"paused" : false,
"triggers" : [ "every-hour-tue-thu" ]
}
}
}
Response Structure
The response contains the registered trigger names for each group. The following table describes the structure of the response:
Path | Type | Description |
---|---|---|
|
|
Trigger groups keyed by name. |
|
|
Whether this trigger group is paused. |
|
|
An array of trigger names. |
Retrieving Overview of a Job Group
To retrieve an overview of the jobs in a particular group, make a GET
request to /actuator/quartz/jobs/{groupName}
, as shown in the following curl-based example:
$ curl 'http://localhost:8080/actuator/quartz/jobs/samples' -i -X GET
The preceding example retrieves the summary for jobs in the samples
group.
The resulting response is similar to the following:
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 201
{
"group" : "samples",
"jobs" : {
"jobOne" : {
"className" : "org.springframework.scheduling.quartz.DelegatingJob"
},
"jobTwo" : {
"className" : "org.quartz.Job"
}
}
}
Response Structure
The response contains an overview of jobs in a particular group. The following table describes the structure of the response:
Path | Type | Description |
---|---|---|
|
|
Name of the group. |
|
|
Job details keyed by name. |
|
|
Fully qualified name of the job implementation. |
Retrieving Overview of a Trigger Group
To retrieve an overview of the triggers in a particular group, make a GET
request to /actuator/quartz/triggers/{groupName}
, as shown in the following curl-based example:
$ curl 'http://localhost:8080/actuator/quartz/triggers/tests' -i -X GET
The preceding example retrieves the summary for triggers in the tests
group.
The resulting response is similar to the following:
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 1268
{
"group" : "tests",
"paused" : false,
"triggers" : {
"cron" : {
"3am-week" : {
"previousFireTime" : "2020-12-04T03:00:00.000+00:00",
"nextFireTime" : "2020-12-07T03:00:00.000+00:00",
"priority" : 3,
"expression" : "0 0 3 ? * 1,2,3,4,5",
"timeZone" : "Europe/Paris"
}
},
"simple" : {
"every-day" : {
"nextFireTime" : "2020-12-04T12:00:00.000+00:00",
"priority" : 7,
"interval" : 86400000
}
},
"dailyTimeInterval" : {
"tue-thu" : {
"priority" : 5,
"interval" : 3600000,
"daysOfWeek" : [ 3, 5 ],
"startTimeOfDay" : "09:00:00",
"endTimeOfDay" : "18:00:00"
}
},
"calendarInterval" : {
"once-a-week" : {
"previousFireTime" : "2020-12-02T14:00:00.000+00:00",
"nextFireTime" : "2020-12-08T14:00:00.000+00:00",
"priority" : 5,
"interval" : 604800000,
"timeZone" : "Etc/UTC"
}
},
"custom" : {
"once-a-year-custom" : {
"previousFireTime" : "2020-07-14T16:00:00.000+00:00",
"nextFireTime" : "2021-07-14T16:00:00.000+00:00",
"priority" : 10,
"trigger" : "com.example.CustomTrigger@fdsfsd"
}
}
}
}
Response Structure
The response contains an overview of triggers in a particular group. Trigger implementation specific details are available. The following table describes the structure of the response:
Path | Type | Description |
---|---|---|
|
|
Name of the group. |
|
|
Whether the group is paused. |
|
|
Cron triggers keyed by name, if any. |
|
|
Simple triggers keyed by name, if any. |
|
|
Daily time interval triggers keyed by name, if any. |
|
|
Calendar interval triggers keyed by name, if any. |
|
|
Any other triggers keyed by name, if any. |
|
|
Last time the trigger fired, if any. |
|
|
Next time at which the Trigger is scheduled to fire, if any. |
|
|
Priority to use if two triggers have the same scheduled fire time. |
|
|
Cron expression to use. |
|
|
Time zone for which the expression will be resolved, if any. |
|
|
Last time the trigger fired, if any. |
|
|
Next time at which the Trigger is scheduled to fire, if any. |
|
|
Priority to use if two triggers have the same scheduled fire time. |
|
|
Interval, in milliseconds, between two executions. |
|
|
Last time the trigger fired, if any. |
|
|
Next time at which the Trigger is scheduled to fire, if any. |
|
|
Priority to use if two triggers have the same scheduled fire time. |
|
|
Interval, in milliseconds, added to the fire time in order to calculate the time of the next trigger repeat. |
|
|
An array of days of the week upon which to fire. |
|
|
Time of day to start firing at the given interval, if any. |
|
|
Time of day to complete firing at the given interval, if any. |
|
|
Last time the trigger fired, if any. |
|
|
Next time at which the Trigger is scheduled to fire, if any. |
|
|
Priority to use if two triggers have the same scheduled fire time. |
|
|
Interval, in milliseconds, added to the fire time in order to calculate the time of the next trigger repeat. |
|
|
Time zone within which time calculations will be performed, if any. |
|
|
Last time the trigger fired, if any. |
|
|
Next time at which the Trigger is scheduled to fire, if any. |
|
|
Priority to use if two triggers have the same scheduled fire time. |
|
|
A toString representation of the custom trigger instance. |
Retrieving Details of a Job
To retrieve the details about a particular job, make a GET
request to /actuator/quartz/jobs/{groupName}/{jobName}
, as shown in the following curl-based example:
$ curl 'http://localhost:8080/actuator/quartz/jobs/samples/jobOne' -i -X GET
The preceding example retrieves the details of the job identified by the samples
group and jobOne
name.
The resulting response is similar to the following:
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 609
{
"group" : "samples",
"name" : "jobOne",
"description" : "A sample job",
"className" : "org.springframework.scheduling.quartz.DelegatingJob",
"durable" : false,
"requestRecovery" : false,
"data" : {
"password" : "secret",
"user" : "admin"
},
"triggers" : [ {
"group" : "samples",
"name" : "every-day",
"previousFireTime" : "2020-12-04T03:00:00.000+00:00",
"nextFireTime" : "2020-12-04T12:00:00.000+00:00",
"priority" : 7
}, {
"group" : "samples",
"name" : "3am-weekdays",
"nextFireTime" : "2020-12-07T03:00:00.000+00:00",
"priority" : 3
} ]
}
If a key in the data map is identified as sensitive, its value is sanitized.
Response Structure
The response contains the full details of a job including a summary of the triggers associated with it, if any. The triggers are sorted by next fire time and priority. The following table describes the structure of the response:
Path | Type | Description |
---|---|---|
|
|
Name of the group. |
|
|
Name of the job. |
|
|
Description of the job, if any. |
|
|
Fully qualified name of the job implementation. |
|
|
Whether the job should remain stored after it is orphaned. |
|
|
Whether the job should be re-executed if a 'recovery' or 'fail-over' situation is encountered. |
|
|
Job data map as key/value pairs, if any. |
|
|
An array of triggers associated to the job, if any. |
|
|
Name of the trigger group. |
|
|
Name of the trigger. |
|
|
Last time the trigger fired, if any. |
|
|
Next time at which the Trigger is scheduled to fire, if any. |
|
|
Priority to use if two triggers have the same scheduled fire time. |
Retrieving Details of a Trigger
To retrieve the details about a particular trigger, make a GET
request to /actuator/quartz/triggers/{groupName}/{triggerName}
, as shown in the following curl-based example:
$ curl 'http://localhost:8080/actuator/quartz/triggers/samples/example' -i -X GET
The preceding example retrieves the details of trigger identified by the samples
group and example
name.
Common Response Structure
The response has a common structure and an additional object that is specific to the trigger’s type. There are five supported types:
-
cron
forCronTrigger
-
simple
forSimpleTrigger
-
dailyTimeInterval
forDailyTimeIntervalTrigger
-
calendarInterval
forCalendarIntervalTrigger
-
custom
for any other trigger implementations
The following table describes the structure of the common elements of the response:
Path | Type | Description |
---|---|---|
|
|
Name of the group. |
|
|
Name of the trigger. |
|
|
Description of the trigger, if any. |
|
|
State of the trigger ( |
|
|
Type of the trigger ( |
|
|
Name of the Calendar associated with this Trigger, if any. |
|
|
Time at which the Trigger should take effect, if any. |
|
|
Time at which the Trigger should quit repeating, regardless of any remaining repeats, if any. |
|
|
Last time the trigger fired, if any. |
|
|
Next time at which the Trigger is scheduled to fire, if any. |
|
|
Priority to use if two triggers have the same scheduled fire time. |
|
|
Last time at which the Trigger will fire, if any. |
|
|
Job data map keyed by name, if any. |
|
|
Calendar time interval trigger details, if any. Present when |
|
|
Custom trigger details, if any. Present when |
|
|
Cron trigger details, if any. Present when |
|
|
Daily time interval trigger details, if any. Present when |
|
|
Simple trigger details, if any. Present when |
Cron Trigger Response Structure
A cron trigger defines the cron expression that is used to determine when it has to fire. The resulting response for such a trigger implementation is similar to the following:
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 490
{
"group" : "samples",
"name" : "example",
"description" : "Example trigger",
"state" : "NORMAL",
"type" : "cron",
"calendarName" : "bankHolidays",
"startTime" : "2020-11-30T17:00:00.000+00:00",
"endTime" : "2020-12-30T03:00:00.000+00:00",
"previousFireTime" : "2020-12-04T03:00:00.000+00:00",
"nextFireTime" : "2020-12-07T03:00:00.000+00:00",
"priority" : 3,
"data" : { },
"cron" : {
"expression" : "0 0 3 ? * 1,2,3,4,5",
"timeZone" : "Europe/Paris"
}
}
Much of the response is common to all trigger types. The structure of the common elements of the response was described previously. The following table describes the structure of the parts of the response that are specific to cron triggers:
Path | Type | Description |
---|---|---|
|
|
Cron trigger specific details. |
|
|
Cron expression to use. |
|
|
Time zone for which the expression will be resolved, if any. |
Simple Trigger Response Structure
A simple trigger is used to fire a Job at a given moment in time, and optionally repeated at a specified interval. The resulting response for such a trigger implementation is similar to the following:
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 549
{
"group" : "samples",
"name" : "example",
"description" : "Example trigger",
"state" : "NORMAL",
"type" : "simple",
"calendarName" : "bankHolidays",
"startTime" : "2020-11-30T17:00:00.000+00:00",
"endTime" : "2020-12-30T03:00:00.000+00:00",
"previousFireTime" : "2020-12-04T03:00:00.000+00:00",
"nextFireTime" : "2020-12-07T03:00:00.000+00:00",
"priority" : 7,
"finalFireTime" : "2020-12-29T17:00:00.000+00:00",
"data" : { },
"simple" : {
"interval" : 86400000,
"repeatCount" : -1,
"timesTriggered" : 0
}
}
Much of the response is common to all trigger types. The structure of the common elements of the response was described previously. The following table describes the structure of the parts of the response that are specific to simple triggers:
Path | Type | Description |
---|---|---|
|
|
Simple trigger specific details. |
|
|
Interval, in milliseconds, between two executions. |
|
|
Number of times the trigger should repeat, or -1 to repeat indefinitely. |
|
|
Number of times the trigger has already fired. |
Daily Time Interval Trigger Response Structure
A daily time interval trigger is used to fire a Job based upon daily repeating time intervals. The resulting response for such a trigger implementation is similar to the following:
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 667
{
"group" : "samples",
"name" : "example",
"description" : "Example trigger",
"state" : "PAUSED",
"type" : "dailyTimeInterval",
"calendarName" : "bankHolidays",
"startTime" : "2020-11-30T17:00:00.000+00:00",
"endTime" : "2020-12-30T03:00:00.000+00:00",
"previousFireTime" : "2020-12-04T03:00:00.000+00:00",
"nextFireTime" : "2020-12-07T03:00:00.000+00:00",
"priority" : 5,
"finalFireTime" : "2020-12-30T18:00:00.000+00:00",
"data" : { },
"dailyTimeInterval" : {
"interval" : 3600000,
"daysOfWeek" : [ 3, 5 ],
"startTimeOfDay" : "09:00:00",
"endTimeOfDay" : "18:00:00",
"repeatCount" : -1,
"timesTriggered" : 0
}
}
Much of the response is common to all trigger types. The structure of the common elements of the response was described previously. The following table describes the structure of the parts of the response that are specific to daily time interval triggers:
Path | Type | Description |
---|---|---|
|
|
Daily time interval trigger specific details. |
|
|
Interval, in milliseconds, added to the fire time in order to calculate the time of the next trigger repeat. |
|
|
An array of days of the week upon which to fire. |
|
|
Time of day to start firing at the given interval, if any. |
|
|
Time of day to complete firing at the given interval, if any. |
|
|
Number of times the trigger should repeat, or -1 to repeat indefinitely. |
|
|
Number of times the trigger has already fired. |
Calendar Interval Trigger Response Structure
A calendar interval trigger is used to fire a Job based upon repeating calendar time intervals. The resulting response for such a trigger implementation is similar to the following:
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 669
{
"group" : "samples",
"name" : "example",
"description" : "Example trigger",
"state" : "NORMAL",
"type" : "calendarInterval",
"calendarName" : "bankHolidays",
"startTime" : "2020-11-30T17:00:00.000+00:00",
"endTime" : "2020-12-30T03:00:00.000+00:00",
"previousFireTime" : "2020-12-04T03:00:00.000+00:00",
"nextFireTime" : "2020-12-07T03:00:00.000+00:00",
"priority" : 5,
"finalFireTime" : "2020-12-28T17:00:00.000+00:00",
"data" : { },
"calendarInterval" : {
"interval" : 604800000,
"timeZone" : "Etc/UTC",
"timesTriggered" : 0,
"preserveHourOfDayAcrossDaylightSavings" : false,
"skipDayIfHourDoesNotExist" : false
}
}
Much of the response is common to all trigger types. The structure of the common elements of the response was described previously. The following table describes the structure of the parts of the response that are specific to calendar interval triggers:
Path | Type | Description |
---|---|---|
|
|
Calendar interval trigger specific details. |
|
|
Interval, in milliseconds, added to the fire time in order to calculate the time of the next trigger repeat. |
|
|
Time zone within which time calculations will be performed, if any. |
|
|
Number of times the trigger has already fired. |
|
|
Whether to fire the trigger at the same time of day, regardless of daylight saving time transitions. |
|
|
Whether to skip if the hour of the day does not exist on a given day. |
Custom Trigger Response Structure
A custom trigger is any other implementation. The resulting response for such a trigger implementation is similar to the following:
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 457
{
"group" : "samples",
"name" : "example",
"description" : "Example trigger.",
"state" : "NORMAL",
"type" : "custom",
"calendarName" : "bankHolidays",
"startTime" : "2020-11-30T17:00:00.000+00:00",
"endTime" : "2020-12-30T03:00:00.000+00:00",
"previousFireTime" : "2020-12-04T03:00:00.000+00:00",
"nextFireTime" : "2020-12-07T03:00:00.000+00:00",
"priority" : 10,
"custom" : {
"trigger" : "com.example.CustomTrigger@fdsfsd"
}
}
Much of the response is common to all trigger types. The structure of the common elements of the response was described previously. The following table describes the structure of the parts of the response that are specific to custom triggers:
Path | Type | Description |
---|---|---|
|
|
Custom trigger specific details. |
|
|
A toString representation of the custom trigger instance. |