Issue
I have a microservice that will receive a message, something like this:
["00:12", "12:20", "15:40"]
Are there any out-of-the-box solutions to allow methods to run at a given time each day? Using cron from Spring does not involve changing the time at runtime. I need to use a more flexible option (change in runtime, multiple launch starts)
Thanks!
Solution
In the proposed options, the solutions are too complex to implement. I made a method with every minute checking whether the current time has come with the time specified in the array.
Answered By - Evgeniy Zelenskiy
Answer Checked By - Gilberto Lyons (JavaFixing Admin)