Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Scheduled agents and the documents they run on

Posted on 2006-06-15
9
371 Views
Last Modified: 2013-12-18
Greeting learned ones,

I was about to schedule an agent to run on a weekly basis but then wondered how exactly does a scheduled agent work. You set the schedule and then you select either all documents in the database or all new and modified documents. And yet I don't want the agent to run on either of these choices. My agent grabs information from databaseB, checks it against documents in a specific view in databaseA and if a doc does not exist in databaseA but does in databaseB, it will create the doc in databaseA. So I should be able to go ahead and run this agent? Anything to look out for other than UI type functions? Thank you.
0
Comment
Question by:notesrookie
  • 4
  • 4
9 Comments
 
LVL 15

Expert Comment

by:mshogren
ID: 16914917
Hi,

If you are using Lotusscript in your agent then your document does not run on all document or all new and modified documents unless you use the UnprocessedDocuments property of the database object.  Those options are intended more for formula agents.

Your agent sounds like it should run fine.  One thing to consider is whether or not databaseA and databseB are on the same server.  If not then you may have to change the security settings on the server documents in order for and agent on one server to operate on a database on another.
0
 
LVL 18

Expert Comment

by:marilyng
ID: 16915263
How many documents are you running through?  And what is the average time spent, so that you don't exceed the agent time - most servers have a maximum agent time set, and if you exceed it, then the agent shuts down.  While it generally runs fine at first, when the databases accumulate documents, they get slower.

So, agent takes too long to process.. is another one.  It shouldn't create duplicates from the sound of it, and if it runs when nothing else is running then you shouldn't get replication conflicts.
0
 

Author Comment

by:notesrookie
ID: 16936313
I looked at the ACL in databaseB and saw that the server that databaseA is on will not be able to open databaseB. It only allows a selected group reader access to it and I am a part of that group but not the server. If I sign the agent will that allow the agent to do what it needs to do? Thanks.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 15

Expert Comment

by:mshogren
ID: 16936489
Yes it should work if you sign it.
0
 

Author Comment

by:notesrookie
ID: 16938258
Unfortunately, signing the agent, running on behalf of and allowing restricted operation with full administrator rights did not work. Is there anything else that I should try? I know it works but only if I run it from my Notes client. It won't run when scheduled on the server and it specifically stops at the point where it is trying to open the databaseB. Thank you.
0
 
LVL 15

Expert Comment

by:mshogren
ID: 16938415
There should be an error message in the log.nsf database if the agent is not running properly on schedule.  If you tell me what that message is I should be able to help a little more.
0
 

Author Comment

by:notesrookie
ID: 16938575
Basically I coded the agent so that if it is unable to open the database, to exit the procedure. The portion of the agent involved is

ServerName = "Server/Domain"      
dbReplicaID = "852570EE006801F3"
Dim db As New NotesDatabase ("", "")
If db.OpenByReplicaID(ServerName, dbReplicaID) Then
      Print (db.Title & " was successfully opened")
Else
      Messagebox ("Unable to open " & db.Title & ". This procedure will now exit.") *
      Exit Sub
End If

The notes log shows the * lines above. Before I coded it this way the error message I received was AMgr: Agent ('SomeAgent' in 'path\databaseA.nsf') error message: Database ServerB!!path\databaseB.nsf has not been opened yet.
 Thanks.
0
 
LVL 15

Accepted Solution

by:
mshogren earned 125 total points
ID: 16943271
Are databaseA and databaseB on different servers?  That would require you to add serverA to the Trusted Servers field at the bottom of the security tab in the Server document for ServerB
0
 

Author Comment

by:notesrookie
ID: 16943687
Yes they are and I will not be able to add serverA as a trusted server on serverB's server doc. I guess that answers my question. Thank you.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question