This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Boot 3.3.4!spring-doc.cn

This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Boot 3.3.4!spring-doc.cn

The scheduledtasks endpoint provides information about the application’s scheduled tasks.spring-doc.cn

Retrieving the Scheduled Tasks

To retrieve the scheduled tasks, make a GET request to /actuator/scheduledtasks, as shown in the following curl-based example:spring-doc.cn

$ curl 'http://localhost:8080/actuator/scheduledtasks' -i -X GET

The resulting response is similar to the following:spring-doc.cn

HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 1222

{
  "cron" : [ {
    "runnable" : {
      "target" : "com.example.Processor.processOrders"
    },
    "expression" : "0 0 0/3 1/1 * ?",
    "nextExecution" : {
      "time" : "2024-10-03T20:59:59.999687723Z"
    }
  } ],
  "fixedDelay" : [ {
    "runnable" : {
      "target" : "com.example.Processor.purge"
    },
    "initialDelay" : 0,
    "interval" : 5000,
    "nextExecution" : {
      "time" : "2024-10-03T19:30:42.700945591Z"
    },
    "lastExecution" : {
      "time" : "2024-10-03T19:30:37.698865949Z",
      "status" : "SUCCESS"
    }
  } ],
  "fixedRate" : [ {
    "runnable" : {
      "target" : "com.example.Processor.retrieveIssues"
    },
    "initialDelay" : 10000,
    "interval" : 3000,
    "nextExecution" : {
      "time" : "2024-10-03T19:30:47.692443993Z"
    }
  } ],
  "custom" : [ {
    "runnable" : {
      "target" : "com.example.Processor$CustomTriggeredRunnable@772a73b4"
    },
    "trigger" : "com.example.Processor$CustomTrigger@7f61ed7c",
    "lastExecution" : {
      "exception" : {
        "message" : "Failed while running custom task",
        "type" : "java.lang.IllegalStateException"
      },
      "time" : "2024-10-03T19:30:37.727731720Z",
      "status" : "ERROR"
    }
  } ]
}

Response Structure

The response contains details of the application’s scheduled tasks. The following table describes the structure of the response:spring-doc.cn

Path Type Description

cronspring-doc.cn

Arrayspring-doc.cn

Cron tasks, if any.spring-doc.cn

cron.[].runnable.targetspring-doc.cn

Stringspring-doc.cn

Target that will be executed.spring-doc.cn

cron.[].nextExecution.timespring-doc.cn

Stringspring-doc.cn

Time of the next scheduled execution.spring-doc.cn

cron.[].expressionspring-doc.cn

Stringspring-doc.cn

Cron expression.spring-doc.cn

fixedDelayspring-doc.cn

Arrayspring-doc.cn

Fixed delay tasks, if any.spring-doc.cn

fixedDelay.[].runnable.targetspring-doc.cn

Stringspring-doc.cn

Target that will be executed.spring-doc.cn

fixedDelay.[].initialDelayspring-doc.cn

Numberspring-doc.cn

Delay, in milliseconds, before first execution.spring-doc.cn

fixedDelay.[].nextExecution.timespring-doc.cn

Stringspring-doc.cn

Time of the next scheduled execution, if known.spring-doc.cn

fixedDelay.[].intervalspring-doc.cn

Numberspring-doc.cn

Interval, in milliseconds, between the end of the last execution and the start of the next.spring-doc.cn

fixedRatespring-doc.cn

Arrayspring-doc.cn

Fixed rate tasks, if any.spring-doc.cn

fixedRate.[].runnable.targetspring-doc.cn

Stringspring-doc.cn

Target that will be executed.spring-doc.cn

fixedRate.[].intervalspring-doc.cn

Numberspring-doc.cn

Interval, in milliseconds, between the start of each execution.spring-doc.cn

fixedRate.[].initialDelayspring-doc.cn

Numberspring-doc.cn

Delay, in milliseconds, before first execution.spring-doc.cn

fixedRate.[].nextExecution.timespring-doc.cn

Stringspring-doc.cn

Time of the next scheduled execution, if known.spring-doc.cn

customspring-doc.cn

Arrayspring-doc.cn

Tasks with custom triggers, if any.spring-doc.cn

custom.[].runnable.targetspring-doc.cn

Stringspring-doc.cn

Target that will be executed.spring-doc.cn

custom.[].triggerspring-doc.cn

Stringspring-doc.cn

Trigger for the task.spring-doc.cn

*.[].lastExecutionspring-doc.cn

Objectspring-doc.cn

Last execution of this task, if any.spring-doc.cn

*.[].lastExecution.statusspring-doc.cn

Stringspring-doc.cn

Status of the last execution (STARTED, SUCCESS, ERROR).spring-doc.cn

*.[].lastExecution.timespring-doc.cn

Stringspring-doc.cn

Time of the last execution.spring-doc.cn

*.[].lastExecution.exception.typespring-doc.cn

Stringspring-doc.cn

Exception type thrown by the task, if any.spring-doc.cn

*.[].lastExecution.exception.messagespring-doc.cn

Stringspring-doc.cn

Message of the exception thrown by the task, if any.spring-doc.cn

Path Type Description

cronspring-doc.cn

Arrayspring-doc.cn

Cron tasks, if any.spring-doc.cn

cron.[].runnable.targetspring-doc.cn

Stringspring-doc.cn

Target that will be executed.spring-doc.cn

cron.[].nextExecution.timespring-doc.cn

Stringspring-doc.cn

Time of the next scheduled execution.spring-doc.cn

cron.[].expressionspring-doc.cn

Stringspring-doc.cn

Cron expression.spring-doc.cn

fixedDelayspring-doc.cn

Arrayspring-doc.cn

Fixed delay tasks, if any.spring-doc.cn

fixedDelay.[].runnable.targetspring-doc.cn

Stringspring-doc.cn

Target that will be executed.spring-doc.cn

fixedDelay.[].initialDelayspring-doc.cn

Numberspring-doc.cn

Delay, in milliseconds, before first execution.spring-doc.cn

fixedDelay.[].nextExecution.timespring-doc.cn

Stringspring-doc.cn

Time of the next scheduled execution, if known.spring-doc.cn

fixedDelay.[].intervalspring-doc.cn

Numberspring-doc.cn

Interval, in milliseconds, between the end of the last execution and the start of the next.spring-doc.cn

fixedRatespring-doc.cn

Arrayspring-doc.cn

Fixed rate tasks, if any.spring-doc.cn

fixedRate.[].runnable.targetspring-doc.cn

Stringspring-doc.cn

Target that will be executed.spring-doc.cn

fixedRate.[].intervalspring-doc.cn

Numberspring-doc.cn

Interval, in milliseconds, between the start of each execution.spring-doc.cn

fixedRate.[].initialDelayspring-doc.cn

Numberspring-doc.cn

Delay, in milliseconds, before first execution.spring-doc.cn

fixedRate.[].nextExecution.timespring-doc.cn

Stringspring-doc.cn

Time of the next scheduled execution, if known.spring-doc.cn

customspring-doc.cn

Arrayspring-doc.cn

Tasks with custom triggers, if any.spring-doc.cn

custom.[].runnable.targetspring-doc.cn

Stringspring-doc.cn

Target that will be executed.spring-doc.cn

custom.[].triggerspring-doc.cn

Stringspring-doc.cn

Trigger for the task.spring-doc.cn

*.[].lastExecutionspring-doc.cn

Objectspring-doc.cn

Last execution of this task, if any.spring-doc.cn

*.[].lastExecution.statusspring-doc.cn

Stringspring-doc.cn

Status of the last execution (STARTED, SUCCESS, ERROR).spring-doc.cn

*.[].lastExecution.timespring-doc.cn

Stringspring-doc.cn

Time of the last execution.spring-doc.cn

*.[].lastExecution.exception.typespring-doc.cn

Stringspring-doc.cn

Exception type thrown by the task, if any.spring-doc.cn

*.[].lastExecution.exception.messagespring-doc.cn

Stringspring-doc.cn

Message of the exception thrown by the task, if any.spring-doc.cn