getScheduler = function(pushSchedulerComp, app, opts) {
  var scheduler = opts.scheduler || DefaultScheduler;
  if(typeof scheduler === 'function') {
    return scheduler(app, opts);
  }

  if(Array.isArray(scheduler)) {
    var res = {};
    scheduler.forEach(function(sch) {
      if(typeof sch.scheduler === 'function') {
        res[sch.id] = sch.scheduler(app, sch.options);
      } else {
        res[sch.id] = sch.scheduler;
      }
    });
    pushSchedulerComp.isSelectable = true;
    pushSchedulerComp.selector = opts.selector;
    return res; 
  }

  return scheduler;
}
Schedule how the message to send.

@param  {Number}   reqId request id
@param  {String}   route route string of the message
@param  {Object}   msg   message content after encoded
@param  {Array}    recvs array of receiver's session id
@param  {Object}   opts  options
@param  {Function} cb