How to run instantly an lotus notes agent… February 13, 2008
Posted by pierrekoerber in Lotus Admin.Tags: administration, development, Lotus domino, lotus notes, lotusscript, pierre koerber, switzerland, valais
trackback
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)
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.
Thankyou
Hey thanks, that works nice. I rearranged it a little and had a bit of trouble because I overlooked the quotes.