quartz任务停止最佳实践方式

The best way to know for sure is to send a SIGQUIT (kill -3) program and analyze the output to see which thread is still running.

It is very likely that your job (which runs on top of one of Quartz threads) did not react to a shutdown signal and continued to work. For long-time-taking jobs, you can check jobExecutionContext.getScheduler().isShutdown() periodically or program your job to become InterruptableJob and properly respond to interruptions.

你可能感兴趣的:(后端)