Before this commit, triggering a Quartz job on demand was not possible. This commit introduces a new @WriteOperation endpoint at /actuator/quartz/jobs/{groupName}/{jobName}/trigger, allowing a job to be triggered by specifying the {jobName}, {groupName}, and an optional JobDataMap.

See gh-42530


$ curl 'http://localhost:8080/actuator/quartz/jobs/samples/jobOne/trigger' -i -X POST \
    -H 'Content-Type: application/json' \
    -d '{"jobData":{"key":"value","keyN":"valueN"}}'


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

{
  "group" : "samples",
  "name" : "jobOne",
  "className" : "org.springframework.scheduling.quartz.DelegatingJob",
  "triggerTime" : "2024-11-10T09:44:05.425233Z"
}

Comment From: nosan

Thanks, @snicoll PR has been updated.

Comment From: nosan

Thank you, @wilkinsona and @snicoll

The PR has been updated. I've implemented the "state": "running" approach, as I believe it will be easier to extend in the future. However, if you think "running": true is a better option, please let me know, and I’ll update the PR accordingly.