schedulealgorythm