Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scheduled Vs. on event agent

Status
Not open for further replies.

portagal

Programmer
Jul 28, 2004
32
CA
Hi,
My agent is running perfectly when run from menu but when i set it to run on schedule it is not running. This agent is supposed to connect to several different databases and collect some info and create a new document.
Any idea why it is not running on scheduel?

Many thanks in advance
 
Did you include any NotesUI objects in the declarations ? Scheduled agents cannot work with NotesUIWorkspace, NotesUIDatabase, NotesUIDocuments or any other NotesUI object. That will automatically disqualify the agent for running. Another issue is with network disc access. When you run under the client, you have all the connections you need. When the agent runs scheduled, it's the server that needs those network mappings.

Otherwise, have you signed it with the right authority ? When you run the agent manually, you (most probably) run it under your credentials, and you have access to that which you work with.

When the agent runs scheduled, it runs as the authority that last signed the agent. If it is you, that might mean that you simply do not have the right to run scheduled agents. If it is not you, that might mean that the authority that signed the agent does not have access to the resources.

There might be more things to check, but I think this is a pretty good starting point.

Pascal.
 
Thanks for your reply Pascal. i am very new in Lotus and greatly appreciate your help, I examined your suggestions:
1- I am not using any NotesUI objects
2- I am trying to run this agent on Local
3- I have set the agent to run on be half myself, so if i don't have the right to run scheduled agent, i expect to see some errors or warnings either when setting up that agent or see something in agent's log? Considering the possibility how that privilege can be granted to someone?

Thanks a lot,
portagal
 
Problem Solved.

My Notes Client wasn't set to run scheduled agent -- As simple as that !!!!
 
I have an agent (writen in LotusScript) when run creates a new doc using a form and along the way it adds new elements to it such as creating new RichTextItem, sections, tables, text...
in one part of the script after i create a new RichTextItem and a section in this item i am appending a table:

Dim mySection As New NotesRichTextItem(newDoc, thename)
Call mySection.BeginSection(theTitle)
Call mySection.AppendTable(numOfRow%, numOfCol%,,,styles)
Call mySection.EndSection
Dim rtNav As NotesRichTextNavigator
Set rtNav = mySection.CreateNavigator
Set rtTable = rtNav.GetFirstElement(RTELEM_TYPE_TABLE ) <--

when run on menu it runs perfectly and does what it is suppose to but when set to run on schedule it gives "Object variable not set" on marked line.

any help would be greatly appreciated
 
This being a different problem, you should really have posted a new thread for it, but no matter.

I checked, but I didn't find anything that says that the NotesRichTextNavigator cannot be used in a scheduled agent.

So, given that the code snippet that you posted does not seem to hold any scheduled-adverse elements either, could you post everything ? Or at least all the DIM statements ?

Pascal.
 
Hi Pascal,

I posted this problem here by mistake, please see my post titled: "getting error running an agent, only when on schedule not on menu"

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top