I have two different tasks, let's call them A and B.
Task A should start immediately (t0) and stop after a fixed time (t1), task B should start after a fixed time (t1) and run until i stop the service.
Both task A and B should do something every x seconds (for convenience, print a string). I know that in Springboot i can achive that using this annotation:
@Scheduled(fixedDelay = 6000)
private void taskA(){
print("A")
}
But i have no clue how to start and stop each tasks after the time window has passed. I have made a simple scheme to help you understand better.
Thanks
