unit test for scheduler run