run function for Schedule