code: public synchronized boolean delete(final Job job) {
          // if already shutdown in the process of shutdown, there is no
          // need to remove Jobs as they will never be executed.
          if (shutdown) {
              return false;
          }
          int i = findIndex(job);
          if (i != -1) {
              ScheduledJobEntry se = (ScheduledJobEntry) jobList.remove(i);
              if (se.job != job) { // this should never happen
                  new IllegalStateException("Internal programming error");
              }
              // if the job is the first on the list,
              // then notify the scheduler thread to schedule a new job
              if (i == 0) {
                  this.notifyAll();
              }
              return true;
          } else {
              return false;
          }
      }
docs: Delete the given job.
  @param job job.
  @return true if the job could be deleted, and
  false if the job could not be found or if the Scheduler is about to
  shutdown in which case deletions are not permitted.