code: private void runHeartbeatLoop() {
  		final long interval = GlobalConfiguration.getInteger(
  						ConfigConstants.TASK_MANAGER_HEARTBEAT_INTERVAL_KEY,
  						ConfigConstants.DEFAULT_TASK_MANAGER_HEARTBEAT_INTERVAL);
  
  		while (!shutdownStarted.get()) {
  			// send heart beat
  			try {
  				LOG.debug("heartbeat");
  				this.jobManager.sendHeartbeat(this.localInstanceConnectionInfo, this.hardwareDescription);
  			} catch (IOException e) {
  				if (shutdownStarted.get()) {
  					break;
  				} else {
  					LOG.error("Sending the heart beat caused an exception: " + e.getMessage(), e);
  				}
  			}
  			
  			// sleep until the next heart beat
  			try {
  				Thread.sleep(interval);
  			}
  			catch (InterruptedException e) {
  				if (!shutdownStarted.get()) {
  					LOG.error("TaskManager heart beat loop was interrupted without shutdown.");
  				}
  			}
  		}
  	}
docs: This method send the periodic heartbeats.