Made a function that generates a data structure containing schedule information.