Skip to main content

developerWorks Site Navigation

 
developerWorks
AIX and UNIX
IBM Systems
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Architecture
Autonomic computing
Grid computing
Java™ technology
Linux
Open source
Power Architecture™
SOA and Web services
Web development
XML
About dW
Submit content
Feedback


developerWorks  >  Lotus  >  Forums & community  >  Lotus Notes and Domino wiki
developerWorks

Domino Wiki

Agent Manager and run command
Added by Jérôme Deniau, last edited by Amy Smith on 05/19/2008

 Before using the "TELL AMGR RUN "DB.NSF" 'AgentName' " you should verify that the agent code will not put your production server down.

This command runs as if you were a Notes client on the Domino server, so the impact is that all agent configuration applies to all agents except this one.

All scheduled agents will not run if the agent you run this way will use too many CPU or Agent Manager resources.

What code is to avoid:

- For instance this one

(Database contains 25000 documents), the designer team has added 2 subforms with approx. 10 shared fields, there is just one form in the Notes Database

Sub Initialize
 Dim s As New notessession
 Dim db As notesdatabase
 Dim coll As notesdocumentcollection
 
 Dim doc As notesdocument
 
 Set db = s.CurrentDatabase
 Set coll = db.UnprocessedDocuments
 Set doc = coll.GetFirstDocument
 Msgbox "Started"
 Do While Not doc Is Nothing
  Call doc.ComputeWithForm(True,False)
  Call doc.Save(True,False,False)
  Set doc = coll.GetNextDocument(doc)
 Loop
 Msgbox "terminated"
End Sub

The agent will run approximatively 45 MINUTES, the consequence is directly detected in the log.nsf or on the console:

26/04/2008 23:01:56   Agent Manager: Start of execution for agent 'agHousekeeping$ServerL3' in database 'webadmin.nsf' is behind schedule by 65 minutes(s). Threshold level 60 minutes(s). Agent Owner: 'x Team'
26/04/2008 23:01:56   Agent Manager: Start of execution for agent 'replicaCheck' in database 'Blog.nsf' is behind schedule by 63 minutes(s). Threshold level 60 minutes(s). Agent Owner: 'Lotus Notes Template Development/Lotus Notes'.
26/04/2008 23:01:56   Agent Manager: Start of execution for agent 'replicaCheck' in database 'Blog2.nsf' is behind schedule by 63 minutes(s). Threshold level 60 minutes(s). Agent Owner: 'Lotus Notes Template Development/Lotus Notes'.
....

 

and so on until the agent stops and after.

 

You can stop such kind of agents with the command TELL AMGR CANCEL "dbname.nsf" 'AgentName'