code: public boolean isRestartScheduled() {
          for (UpdateCenterJob job : getJobs()) {
              if (job instanceof RestartJenkinsJob) {
                  RestartJenkinsJob.RestartJenkinsJobStatus status = ((RestartJenkinsJob) job).status;
                  if (status instanceof RestartJenkinsJob.Pending
                          || status instanceof RestartJenkinsJob.Running) {
                      return true;
                  }
              }
          }
          return false;
      }
docs: Checks if the restart operation is scheduled
  (which means in near future Jenkins will restart by itself)
  
  @see #isRestartRequiredForCompletion()