Added code to fetch schedule

The server keeps going down so I can't properly debug.