code: private synchronized void schedule(final ScheduledJobEntry newSJE) {
          // disallow new jobs after shutdown
          if (shutdown) {
              return;
          }
          int max = jobList.size();
          long desiredExecutionTime = newSJE.desiredExecutionTime;
  
          // find the index i such that timeInMillis < jobList[i]
          int i = 0;
          for (; i < max; i++) {
  
              ScheduledJobEntry sje = (ScheduledJobEntry) jobList.get(i);
  
              if (desiredExecutionTime < sje.desiredExecutionTime) {
                  break;
              }
          }
          jobList.add(i, newSJE);
          // if the jobList was empty, then notify the scheduler thread
          if (i == 0) {
              this.notifyAll();
          }
      }
docs: Schedule a job.
  @param newSJE new job entry.