def METHOD_NAME(self, schedule_id, session=None):
    """Update schedule"""
    new_schedule = request.json
    schedules = self.manager.config.get('schedules', [])
    # Checks for boolean config
    if schedules is True:
        self.manager.config['schedules'] = DEFAULT_SCHEDULES
    elif schedules is False:
        raise Conflict('Schedules are disables in config')
    schedule, idx = _schedule_by_id(schedule_id, self.manager.config['schedules'])
    if not schedule:
        raise NotFoundError('schedule %d not found' % schedule_id)
    new_schedule['id'] = id(schedule)
    self.manager.config['schedules'][idx] = new_schedule
    self.manager.save_config()
    self.manager.config_changed()
    resp = jsonify(new_schedule)
    resp.status_code = 201
    return resp