           'end':       end,
           'user_id':   userId
         }
-        withCurrentOncall msg, scheduleId, (old_username) ->
+        withCurrentOncall msg, matchingSchedule, (old_username, schedule) ->
           data = { 'override': override }
-          pagerDutyPost msg, "/schedules/#{scheduleId}/overrides", data, (json) ->
+          pagerDutyPost msg, "/schedules/#{schedule.id}/overrides", data, (json) ->
             if json.override
               start = moment(json.override.start)
               end = moment(json.override.end)

        msg.finish
        return

      withScheduleMatching msg, msg.match[2], (schedule) ->

        scheduleId = schedule.id
        return unless scheduleId

        start     = moment().format()
        minutes   = parseInt msg.match[3]

      until: oneHour,
      overflow: 'true'
    }
    pagerDutyGet msg, "/schedules/#{schedule.id}/entries", query, (json) ->
      if json.entries and json.entries.length > 0
        cb(json.entries[0].user.name, schedule)

  pagerDutyIncident = (msg, incident, cb) ->
    pagerDutyGet msg, "/incidents/#{encodeURIComponent incident}", {}, (json) ->
