Got basic scheduler logic working