add code to run scheduler