updated scheduler script part 2