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