Quartz Quartz 是一個功能滿完整的 Java Schedule 排程工具, 核心就圍繞在 Scheduler 與 Job 的操作上。 Scheduler - the main API for interacting with the scheduler. Job - an interface to be implemented by components that you wish to have executed by the scheduler. JobDetail - used to define instances of Jobs. Trigger - a component that defines the schedule upon which a given Job will be executed. JobBuilder - used to define/build JobDetail instances, which define instances of Jobs. TriggerBuilder - used to define/build Trigger instances. Job Quartz 的 Job 被定義為需要 implement org.quartz.Job , 需要實作 void execute(JobExecutionContext jobExecutionContext) , jobExecutionContext, 可以取得 Job 的 Scheduler, Trigger, JobDetail 的相關設定, 相關的說明可以參考 tutorial-lesson-02 . import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import org.quartz.Job; import org.quartz.JobDataMap; import org.quartz.JobDetail; import org.quartz.JobExecutionContext; import org.quartz.JobExecutio...