I am using spring and springboot, and I have case with two tasks, which until now was triggered by @Scheduled with fixed delay. It is a must condition, that next task won't start if previous did not end. But now I got another requirement, tasks can only be triggered between specific hours and for the rest of the day it must not. I read documentation of @Scheduled but I do not see such an option. So my question is, if there is simple solution where:
- task will not start before the previous is not ended
- task will be triggered only between 15:00 and 18:00 or I have to do some code gimmick for it?