refactor schedule stuff to use api response instead of parsing locally

Pull out schedule run time stuff and use api response.