node_modules/pomelo-scheduler/lib/schedule.js
/**
 * The function used to ran the schedule job, and setTimeout for next running job
 */
The function used to ran the schedule job, and setTimeout for next running job
The function used to ran the schedule job and setTimeout for next running job
function excuteJob(){
  var job = peekNextJob();
  var nextJob;
  while(!!job && (job.excuteTime()-Date.now())<accuracy){
    job.run();
    queue.pop();
    var nextTime = job.nextTime();
    if(nextTime === null){
      delete map[job.id];
    }else{
      queue.offer({id:job.id, time: nextTime});
    }
    job = peekNextJob();
  }
  if(!job)
    return;
  setTimer(job);
}
function excuteJob ( ) { var job = peekNextJob ( ) ; var nextJob ; while ( ! ! job && ( job . excuteTime ( ) - Date . now ( ) ) < accuracy ) { job . run ( ) ; queue . pop ( ) ; var nextTime = job . nextTime ( ) ; if ( nextTime === null ) { delete map [ job . id ] ; } else { queue . offer ( { id : job . id , time : nextTime } ) ; } job = peekNextJob ( ) ; } if ( ! job ) return ; setTimer ( job ) ; }
The function used to ran the schedule job, and setTimeout for next running job
The function used to ran the schedule job and setTimeout for next running job
//If all the job have been canceled //Run next schedule