ServerName (NotesAgent - JavaScript)

Read-Write. The name of the server on which an agent runs.

Defined in

NotesAgent

Syntax

getServerName() : string

setServerName(serverName:string) : void

Usage

The value returned by getServerName depends upon whether the agent is scheduled:
  • If the agent is scheduled, the property returns the name of the server on which the scheduled agent runs. Since scheduled agents can only run on a single replica of a database, you designate a server name for the agent under Schedule in the Agent Properties box. Therefore, the ServerName property may represent the parent database's server, or it may represent a replica's server.
  • If the agent is not scheduled, this property returns an empty string.

You can set this property to the asterisk (*) to indicate that the agent can run on any server.

A null server name means the local workstation.

You must call save to make any change effective.