Set up scheduler