I want to wail my scheduler till my task is complete.if there is time for second schedule execution, it has to wait till previous task is not complete. I m using @Schedule in java Boot application. I want to insert data into data base in every 5 minutes but i want to hold my schedule till the inset data is not complete still there is a time for second execution.Demo Code
@Scheduled(fixedRate = 2000)
public void scheduleTaskWithFixedRate() {
logger.info("Fixed Rate Task :: Execution Time - {}", dateTimeFormatter.format(LocalDateTime.now()) );
}