Stop scheduler when nothing to do