How to run multiple agents in the same database using a Program document


The Lotus Domino server is designed to execute agents that exist in the same database sequentially, with only one agent running at a time.  The Agent Manager task has a built-in scheduler that, for optimization reasons, runs only scheduled agents that exist in the same database with the same agent start time as sequential.

You need to run multiple agents at the same time or outside of the frequency of the Agent Manager’s schedule.

Create a Program document, and fill out the following fields on the form as shown:

Program Name:  nserver   (or server if not Windows platform)

Command Line:  -c “tell amgr run ‘database.nsf‘ ‘agent‘”

Substitute your database name and agent name.  The correct use of quotation marks ( ” ) and apostrophe ( ‘ ) is important.

When Domino runs the agent this way, a separate thread is created to process the agent. This separate thread allows it to run while other agents are being processed through the Agent Manager task.


There are a number of serious issues you should be aware of if you plan to use such a process.

Because the agent is spawned in a separate thread, the Agent Manager task is unable to access this agent once it is running. This means that you cannot stop the agent once it is running.

A large number of agents running on the same database at the same time can have potential performance issues.

Your agent must be coded to anticipate other agents working on the same data. For example, having one agent write to a document while the other agent is reading could have unexpected results.  You might need document locking logic in the agent.

The information above is from this TechNote