Manage Learn to apply best practices and optimize your operations.

Run selected agent on server

This tip describes how to Run selected agent on server.

For testing purposes you often have to test scheduled agents which only run on server. With this agent you can select all scheduled agents in a database and run them on server.

 Option Public
Option Declare

Sub Initialize
 Dim s As New NotesSession
 Dim ws As New NotesUIWorkspace
 Dim db As NotesDatabase
 Dim agent As NotesAgent
 Dim selAgent As Variant
 Dim i As Integer
 On Error Goto Fehler
 Set db = s.CurrentDatabase
 Forall a In db.Agents
  If a.Trigger = 1 Then
   Redim Preserve varAgent(i)
   varAgent(i) = a.Name
   i = i + 1
  End If
 End Forall
 selAgent = ws.Prompt( PROMPT_OKCANCELCOMBO, "Auswahl des Agenten", _
 "Bitte einen Agenten auswahlen: ", varAgent(0), varAgent) 
 If selAgent = "" Then Exit Sub 
 Set agent = db.GetAgent(selAgent)
 If agent.RunOnServer = 0 Then 
  Print "Agent ist gelaufen."
  Exit Sub  
  Msgbox "Agent konnte nicht gestartet werden.", 64, "Hinweis" 
 End If
 Exit Sub
 Msgbox "Error (" & Cstr(Err) & " ) -≶ " & Error$(Err), 16, "Agent: Run Agent on Server"
 Exit Sub
End Sub

Dig Deeper on Domino Resources - Part 5



  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...