I have a Spring Boot app, and there are a few processes that run every hour. I'm using @Scheduled with a cron expression for that.
Now I've got a change request, which consists in allowing the UI change to change the frequency of the processes in runtime, which is specified in a database table like the one below.
Table:
Id, name, cronexp, some_foreing_key
1, "John", "0 0 1 * * *", 4
2, "Steve", "0 0 2 * * *", 8
For now, what I imagine is maybe having a method annotated with @Scheduled that executes every number of minutes, which then somehow checks the time that has passed against those expressions. Any ideas?