Created scheduler functionality and unit test