Spring, Spring Boot, Spring Framework, Java, Programming.
org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; @Component public class MyScheduledTasks { @Scheduled(cron = "*/1 * * * * *") // Execute every 1 second @Async // Execute in a separate