We all know how frustrating it can be to debug those agents that run on the server.
When you have loops you never know if the agent is running or is in an endless loop.
What I do is that I create a mail doc and I send it to me (or any other address) as the mail processes at pre-defined intervals (1000 in the example)
dim ses as new notesSession dim db as notesDatabase dim doc as notesDocument dim dcol as notesDocumentCollection dim counter as long dim mailDoc as notesDocument set db = ses.currentDatabase set dcol = db.unprocessedDocuments set mailDoc = db.createDocument mailDoc.sendto = "email@example.com" set doc = dcol.getFirstDocument while not doc is nothing ... ... Your loop processing code ... ... counter = counter + 1 if counter mod 1000 = 0 then mailDoc.subject = "Processed up to: " & format(Counter,"#,##0") call maildoc.send(true) end if set doc = dcol.getNextDocument(doc) wend