Friday, July 26, 2024

Spring Scheduling Tasks

How can we Schedule Cron Expression in Spring Boot?
  • We can use @Scheduled(cron=“@weekly”) at the top of the method.
  • @EnableScheduleing at to of service.
  • @Schedule(cron=“09** SUN”)
  • Enable scheduling tells the spring that our product has methods which needs to be scheduled.
  • Scheduled annotation takes a  cron expression And executes them As per the cron schedule

No comments:

Post a Comment

Spring Boot

What is circular/cyclic dependency in spring boot? When two services are interdependent on each other, that is to start one service, we requ...