node_modules/pomelo-admin/node_modules/pomelo-scheduler/lib/cronTrigger.js
/**
 * return the next match time of the given value
 * @param value The time value
 * @param cronTime The cronTime need to match
 * @return The match value or null if unmatch(it offten means an error occur).
 */
return the next match time of the given value
@param value The time value
@param cronTime The cronTime need to match
@return The match value or null if unmatch(it offten means an error occur).
return the next match time of the given value @param value The time value @param cronTime The cronTime need to match @return The match value or null if unmatch ( it offten means an error occur ) .
function nextCronTime(value, cronTime){
  value += 1;
  if(typeof(cronTime) == 'number'){
    if(cronTime == -1)
      return value;
    else
      return cronTime;
  }else if(typeof(cronTime) == 'object' && cronTime instanceof Array){
    if(value <= cronTime[0] || value > cronTime[cronTime.length -1])
      return cronTime[0];
    for(var i = 0; i < cronTime.length; i++)
      if(value <= cronTime[i])
        return cronTime[i];
  }
  logger.warn('Compute next Time error! value :' + value + ' cronTime : ' + cronTime);
  return null;
}
function nextCronTime ( value , cronTime ) { value += 1 ; if ( typeof ( cronTime ) == 'number' ) { if ( cronTime == - 1 ) return value ; else return cronTime ; } else if ( typeof ( cronTime ) == 'object' && cronTime instanceof Array ) { if ( value <= cronTime [ 0 ] || value > cronTime [ cronTime . length - 1 ] ) return cronTime [ 0 ] ; for ( var i = 0 ; i < cronTime . length ; i ++ ) if ( value <= cronTime [ i ] ) return cronTime [ i ] ; } logger . warn ( 'Compute next Time error! value :' + value + ' cronTime : ' + cronTime ) ; return null ; }
return the next match time of the given value
 @param value The time value
 @param cronTime The cronTime need to match
 @return The match value or null if unmatch(it offten means an error occur).
return the next match time of the given value @param value The time value @param cronTime The cronTime need to match @return The match value or null if unmatch ( it offten means an error occur ) .