|
|
Add a configure button to the application's UI. You can use these @Commands in the button
@Command([AgentSetServerName];"AgentName"); // prompts for server name @Command([AgentEnableDisable];"AgentName"; "1");
Alternately, you could have a second unhidden database which just has agents which call agents within the hidden database. This technique lets the user set the schedule for the other agents. Here is code that will run an agent in another database:
Sub Initialize
Dim db As New NotesDatabase("", "")
Dim Agent As NotesAgent
If (db.open("", "hiddenDB.nsf")) Then
Set Agent = db.GetAgent("(Check Servers For Response)")
If Not(Agent Is Nothing) Then
Call Agent.Run
Else
Msgbox "Agent not found..."
End If
End If
End Sub