Scheduled will expire after a period of execution, and will be executed again after restarting the tomcat service.

by introducing the timing of @ Scheduled (which is set to be executed every three seconds), the timing will not be executed again after a certain period of time, and the scheduled task will run again after restarting tomcat. What is the cause

clipboard.png

Apr.25,2022

if the first execution is successful, the timed thread starts normally and will not be executed after a period of time. I suspect that there are other tasks blocking the timed thread. The subject can check whether there are any other time-consuming tasks in the code, observe the situation of the task queue, and take a look at the status of the timed thread after failure.

Menu