I have a database with multiple rows having a date time column, i want to create a scheduler that runs every 5 minutes and reads the records from that table on the date time column and picks all records which have date lesser than current time, and executes some business logic on those records one by one in a clustered environment, and one record must be processed only once. I cannot use Quartz since that will need me to store the Job etc in another table which at present is not an option for me. PLease if you can guide me.
Asked
Active
Viewed 25 times
1 Answers
0
You can learn the info from there. In two words, add @EnableScheduling
onto your main()
method's class, than create a new method in some controller and add @Scheduled
annotation on the method.

Maxim Gaiduchek
- 31
- 5