Run Agent in another db from my inbox

Hello All,

I have a small agent in a db which gets the count of various inboxes and sends it as a html mail. I cannot schedule this agent, if I schedule this agent its not running bcos of server side codings. I have to run it manually each and every time.

Is there any option of running this Agent from my inbox. I mean any option of running an Agent in another db from my inbox.

Please help me guys. It will be very help full for me.

Thanks in advance.

Regards

Madhan

Subject: Run Agent in another db from my inbox

from an agent or action in your inbox - make an instance of the database where the agent that you want to run is. Make an instance of the agent to run. run the agent using agent.run method.

Peter Närlund, DomainPatrol

http://domainpatrol.org

Subject: RE: Run Agent in another db from my inbox

Hi Peter,

Thanks for your responce. I am not sure how to do it, can you please explain it It will be very very helpful for me.

Thanks in advance

Regards

Madhan

Subject: RE: Run Agent in another db from my inbox

Sub Initialize Dim s As New NotesSession

Dim db As NotesDatabase

Set db = s.GetDatabase(“snapper”, “names2”)

If Not db.IsOpen Then

Messagebox "names2.nsf does not exist on snapper",, _

"No names2.nsf"

Else

Messagebox db.Title,, "Title of names2.nsf"

End If

Dim agent As NotesAgent

Set agent = db.GetAgent(“Agent to be run LotusScript”)

If agent.Run = 0 Then

Messagebox "Agent ran",, "Success"

Else

Messagebox "Agent did not run",, "Failure"

End If

End Sub

Subject: Run Agent in another db from my inbox

An alternate is creating a local replica of your Lotus Notes Mail database and scheduling the Agent to run locally. Make sure you turn on ‘Enable Scheduled Local Agents’ under the Lotus Notes client File>User Preferences option.
Lastly just make to specify the destination server in your agent code if not already.