I have an agent running daily that will create a bunch of documents if the date is the 1st or the 15th of the month. It doesn’t need to target any existing documents, as it is only looking at the date and creating new docs if the dates are right.
The agent is currently set to ‘all documents in database’ and it will work, but when testing finds 5369 docs. Is it going to run 5369 times? How can I prevent this?
Subject: Must an agent have a target document(s)?
Perhaps you should use LotusScript rather than formulas. If it’s LS, you can completely ignore the agent’s document selection criteria.
Subject: RE: Must an agent have a target document(s)?
Excellent, thanks. It is script, but i didn’t know if those selection criteria were still in effect or not.
Subject: RE: Must an agent have a target document(s)?
Selection criteria are in place whether or not you’re using script, but if you’re not using UnprocessedDocuments to give you a document collection, they don’t matter.
Subject: Must an agent have a target document(s)?
Just set the target to “None” and it won’t have to have a target.
Subject: RE: Must an agent have a target document(s)?
I was going to suggest that, but then I tried to create a scheduled agent to make sure I had the wording right. The options are all documents and new and modified documents. “None” isn’t an option. At least, it isn’t with the version I’m using.
Subject: RE: Must an agent have a target document(s)?
Yeah – you have to select All or New & Modified, but as noted previously, you don’t have to actually use the resulting collection for anything. I’m not sure which of the two is more efficient if you mean to ignore the agent selected documents, but I’ve always assumed All documents was more efficient because it doesn’t require maintaining unread marks for the modified documents or a search to determine how many documents have been modified recently.
If anyone has done actual tests and has an authoritative answer, I’d be glad to hear it.