code: public void startRegistrationProcess() {
      log.info("using the json request : " + nodeConfig.toJSON());
  
      final int registerCycleInterval = nodeConfig.getConfigAsInt(RegistrationRequest.REGISTER_CYCLE, 0);
      if (registerCycleInterval > 0) {
        new Thread(new Runnable() { // Thread safety reviewed
  
          public void run() {
            boolean first = true;
            log.info("Starting auto register thread. Will try to register every " + registerCycleInterval + " ms.");
            synchronized (this) {
              while (run) {
                try {
                  boolean checkForPresence = true;
                  if (first) {
                    first = false;
                    checkForPresence = false;
                  }
                  registerToHub(checkForPresence);
                } catch (org.openqa.grid.common.exception.GridException e) {
                  log.info("couldn't register this node : " + e.getMessage());
                }
                try {
                  Thread.sleep(registerCycleInterval);
                } catch (InterruptedException e) {
                  e.printStackTrace();
                }
                // While we wait for someone to rewrite server logging.
                LoggingManager.perSessionLogHandler().clearThreadTempLogs();
              }
            }
          }
        }).start();
      }
      LoggingManager.perSessionLogHandler().clearThreadTempLogs();
    }
docs: register the hub following the configuration : <p/> - check if the proxy is already registered before sending a reg request. <p/> - register
  again every X ms is specified in the config of the node.