0

I have an application in Spring Boot and I would like to implement updating a column in a table at a given time by the user. For example, I have a price column and the user wants to lower the price by 400$ but wants it to be lowered at this time: 02-13-2022 13:13:00. So my question is how do I trigger a query to update a given column?

Piotror
  • 85
  • 1
  • 12
  • 3
    If its simple springboot application(one instance) you can use `@Scheduled` annotation. If there are multiple instance of your application you can use `shedlock` oraz `quartz` framework to lock your table so only one instance can do the update. – Paweł Głowacz Feb 13 '22 at 11:08
  • Maybe this answer is helpful: https://stackoverflow.com/questions/56574971/execute-scheduled-custom-sql-queries-in-spring-boot – Philipp Feb 14 '22 at 11:10

0 Answers0