How to cancel a scheduled Quartz job in Spring

后端 未结 2 1873
生来不讨喜
生来不讨喜 2021-02-04 04:54

I\'m using Spring to inject a Quartz scheduler (abstracted with Spring\'s TaskScheduler interface) into my app that loads jobs configured from a database at startup.

It

2条回答
  •  花落未央
    2021-02-04 05:26

    ScheduledFuture job = taskSchedule.schedule(runableThing, new CronTrigger(cronExpression))
    job.cancel(true); 
    

提交回复
热议问题