How to run instantly an lotus notes agent…

Here an original piece of code to launch instantly an agent without to schedule it every5 minutes. This is an original tip.

Here a summary of the Amgr command which allows to launch an agent directly from the notes server console. (from the lotus notes designer help file)

Tell Amgr Run Runs the agents that you designate with these arguments:“db name” ‘agent name’ Example: Tell Amgr Run “DatabaseName.nsf” ‘AgentName’

Ok, the next idea is to use the notessession SendConsoleCommand() which allows to send a console command directly to a server.

So if we put all together we can invoke directly an agent from our code… nice !

Dim se as new notessession
Dim sCmd As String

sCmd = |tell amgr run “%1” ‘%2’|
sCmd = Replace(sCmd, “%1”, “databasePath\file.nsf”)
sCmd = Replace(sCmd, “%2”, “agentName”)
Call se.SendConsoleCommand(“yourServerName”, sCmd)


About pierrekoerber
Hey, pour faire connaissance, laisse-moi un message... drop me a line.

3 Responses to How to run instantly an lotus notes agent…

  1. can you provide some Snapshot that how to rus the Agent in lotus Domino please help me sir and if possible please provide me the snap shot of Compaq process.


  2. James Collie says:

    Hey thanks, that works nice. I rearranged it a little and had a bit of trouble because I overlooked the quotes.

  3. You cannot find such affordable web hosting like this. Upon reviewing several forums and web hosting sites such as Hostjury, the mass customer satisfaction for
    MT is hot and cold. These charges can get steep quickly so make sure that you’re being realistic when you consider the plan that’s
    going to meet your needs.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: