Prevent Scheduler from starting another task before previous task finishes

@patriknw, thanks so much for your valuable feedback. I will definitely also look into your suggestion.