def delete_schedule(api, schedule_name):
    """
    Delete a schedule for a user.
    
    :type api: :class:`mortar.api.v2.api.API`
    :param api: API

    :type schedule_name: str
    :param schedule_name: Name of the schedule to delete.
    
    :raises: requests.exception.HTTPError: if a 40x or 50x error occurs
    """
    api.delete('schedules/%s' % schedule_name)
