break if no more tasks scheduled