Anybody knows if its possible to execute one agent over many NSF files?I mean, if you execute “tell amgr run”, is there a command to execute one agent over many NSF? for example “tell amgr run mail*.nsf”…???
Subject: why not recoding the agent, so that it does it right!?
Ifg I understand you right, then there is an agent, that is in every mail- database on your server, and you want to run this agent in each mal- database.
That means: If you have 100 - Databases, then there are 100 agents to run.
As I don’t know any agent in the mail- design that should run once, I assume, that this Agent is your own development.
In my opinion the better solution would be, to write ONE agent (run in a special agent- database) that iterates over all mail- databases (using NotesDBDirectory) and do your code for every database.
Then you can log your actions in this agent- database and only have one agent to run…
Regards
Torsten
Subject: How?
Thanks for your response, in advance.
So, how can I execute my agent over the 100 NSF databases? I mean, what is additional command of “tell amgr run” that executes the agent over the 100 NSF files? Typing the mail database folder? Really I don’t know or I’m not able to explain it.
thks a lot
Subject: I think you do not understand tell amgr run
The database- parameter of tell amgr run is not a parameter to say, on wich databases the agent should run but in which database the agent resides.
If you have a database called “agentdb.nsf” and an agent called “MyAgent” then your command would be:
tell amgr run “agentdb.nsf” ‘MyAgent’
Agentmanager has to KNOW where the agent is, that you want to run… and tis is the database- parameter…
If your agent should work on all databases in mail- Directory, then you have to code the agent to do so. This is onyl possible in LotusScript, as Formula does not allow something like this.
The other possibility would be to modify the amil- template and add the agent there. But then you would have to type tell amgr run … into your console as often as you have mail- databases.
Best regards
Torsten
Subject: yep
bullseye, i don’t understand him at all!
thanks for your aclaration, now i see how it works. sure, it was very helpful to me.
I’m gonna try this just like you explained.
thank you very much!
Subject: Depends on the agent.
There are a couple of ways to do this.
-
Create a master agent. LotusScript/Java which iterates through the databases and runs the agent using the NotesAgent class.
-
You can pipe commands to Domino console for example. Create a text file with the list of commands, then at the Domino console you type.
< commands.txt
I really don’t recommend this method though in relation to agents (It is handy for small things).
- (which I recommend). If all the databases run off the same template. Then edit the template to run the agent when the user logs into the database. If it needs to run only once then set a notes.ini or profile document setting per user. Then update the databases with the new template.
The last option will offload the agents execution for each users workstation, being less of a burden.
Subject: Not possible
However, it would be easy to write an agent that enumerates through all databases and executes an agent. That’s the agen you would invoke via the console command or some other means.