scheduler.cpp tested.