@Scheduled tasks are synchronous by default, new tasks won't be triggered unless the previous one gets completed.
@Scheduled(fixedRate = 2000)
public void synchronousTask(){
// new task will be trigged only if previous job gets completed.
}
If you want async task use @Async tag along with @Scheduled tag, also you need to configure the threed pool size
spring.task.scheduling.pool.size = 2 //configure the pool size based on your usecase
@Async
@Scheduled(fixedRate = 2000)
public void asyncTask(){
// this task wont wait for completion of previous task
}