Agent runs when triggered manually but fails when scheduled

Hello,

I have an agent which does certain validations and based on the results, it would update documents. If the validations fail then a log is created. If an error occurs, an error log is created.

The problem is, when the agent is manually run, it runs without any problem but when scheduled to run on a server, it is not running properly and throws an error.

Error Details : 29 - 4005 - Notes error: The WEB Navigator retrieval process is not running.

We are trying to fetch details from an API by storing the API Locator in a profile document

Kindly suggest a solution as to what exactly we need to do. Change agent properties or server configuration or something to do with the WEB navigator.

Thanks in Advance,

Adi

Subject: Agent runs when triggered manually but fails when scheduled

Is the API you’re fetching via HTTP using the notesDatabase.GetDocumentByURL method? The error message is pretty much self-explanatory - you need the WEB retriever task running on the server to use that method in code executed on the server (i.e. a scheduled agent). It works fine manually because your client can retrieve the URL.

Subject: RE: Agent runs when triggered manually but fails when scheduled

Hello Jerry,

Yes, the error message is self explanatory. Can you please suggest as to what is wrong with the web retriever on the server. Any special settings need to be made?

Regards,

Adi

Subject: RE: Agent runs when triggered manually but fails when scheduled

OK, so it’s been a while since this question was asked, but anyway…

The web retriever process needs to run on the server. You can manually load the web retriever by doing “load web” on the console. To make it load automatically on server start, add web to the ServerTasks line of notes.ini on the server.

/Peter

Subject: Agent runs when triggered manually but fails when scheduled

Hello Adi !

I’m really not an expert, but I had a simillar problem and I hope that maybe i can help you…

When you trigger manually your agent, do you use “agent.Run” or “agent.RunOnServer” ?

And agent runned locally don’t need special settings, but if it’s runned on the server, you need to change some securities settings. An scheduled agent is runned on the server… so you need to change the “runtime security level” to “2. Allow restricted operation” (second tab)

If your sever is highly protected and that you don’t have high privileges, your agent may need to be signed by someone with higher privileges. If your agent calls a librairy, the librairy may need to be signed too by someone with the right privileges.

Good luck !

Emilie

Subject: RE: Agent runs when triggered manually but fails when scheduled

Hello Emilie,

Thanks for the response. We run the agent manually from the designer by right-clicking on the agent and select run. I do not really know if thats a good practice…

We have already taken up what you mentioned in your response. Must verify the security levels on the server or must probably be run on behalf of someone’s ID.

Thanks again,

Adi