I need to create a scheduled agent that will generate a text report and send it across to a Lotus Notes mail ID. When I run the agent manually, it works fine and sends email. But after I schedule it on the Global Notes Architecture (GNA) server, it will not send email. The agent is signed by a server admin ID, and the agent is given in the security tab. It allows restricted operations. What could the problem be? I think the server runs OS/400 (but I'm not sure), and it uses few restricted operations like Close, Open, Embed Object. Please help.
If you search the Web for "Julie Kadashevich," you will find a number of articles that help explain the MANY finer points of Lotus Notes agent management. Without having access to both your LotusScript code and your server, I can only guess at the problem. However, here are my top guesses:
- The mail ID used to sign the agent does not have a mailbox on the Lotus Domino server where you want it to run, and the server does not have "DisableMailLookup" set.
- The agent is, in fact, running, but is failing to send the report.
- You have an agent scheduling issue.
It sounds like this agent is scheduled to run either daily or weekly, so it is pretty easy to diagnose if you know where to look. First, in Domino Designer, open the database on the GNA server, go to the agents view, right click on the agent and choose "Log."
If you see a message stating that "This agent has not been run," then you are looking at option 3, and you need to read Julie's articles.
If the log states that the Lotus Notes agent ran at a certain time and an error was raised, then you'll need to debug the agent. Beyond reminding you that scheduled server agents cannot call any object that interacts through the UI (such as NotesUIWorkspace), I can't really help with that.
If the log states that the agent ran and does not mention an error, look to see if it shows the time the agent COMPLETED. If not, something on the server is causing it to fail without raising an error message.
First, if the agent is running too long, the log will state that it timed out. If this is the case, you either need to recode it to run faster, figure out what is getting in an endless loop, or increase the agent runtime restrictions on the Lotus Domino server's document, in the Notes Address Book (NAB).
Now, if the agent says that it ran, but says that it is meant to run on server "XXX", you might wonder, "Why the devil is it trying to run on sever "XXX" -- I told it to run on server "GNA." You have run into a common problem.
In order to keep the "out-of-office agent" from running multiple times in a mailfile replicated across servers, Lotus unwisely and summarily decided to restrict agents to running on the home mail server of the user who signed the agent.
This works fine for the out-of-office agent, but not so well for all other agents (which tend to all be signed by a single corporate agent signer ID.
There are a number of possible solutions. The one I recommend is to set DisableMailLookup on all your application servers, and then make sure that there are no mail files (which could run the out-of-office agent) and any of those servers.
If the GNA server is running on an AS/400 system, then it is likely that the agents (e.g., Close, Open, Embed Object, etc.) do not work. When the agent is run manually, it is probably running locally on a Windows client. Obviously, AS/400 does not work in the same way as Windows XP.
Do you have comments on this Ask the Expert Q&A? Let us know.
Related information from SearchDomino.com:
- Tip: Troubleshooting malfunctioning scheduled agent notifications
- Tip: Determine if a scheduled agent really ran during the night
- Reference Center: Lotus Notes/Domino agents tips and resources
Dig Deeper on Lotus Notes Domino Agents
Related Q&A from Cregg Hardwick
A user wants to know if it's possible for LotusScript to read an attachment in a Notes document without first detaching it. Find out our expert's ... Continue Reading
Learn about different options using LotusScript code and Formula language to customize the principal field of outgoing Lotus Notes email messages. Continue Reading
Read about merging cells in a Microsoft Word table using LotusScript and an Excel example, along with the thought process that goes along with it. Continue Reading