setting up scheduler