finish scheduler test code & complete