При запуске агента иногда встречается ошибка типа «HTTP-сервер: ограничение времени выполнения, превышенное агентом xxx». Но если запустить снова, он будет работать правильно. Значит ли это, что агент заблокирован другими задачами? Где я должен исследовать причину? Код как ниже:
Set tDb = New NotesDatabase(db.Server, "test\Test.nsf")
Set tView = tDb.GetView("TestView")
Set tDoc = tView.GetFirstDocument
lastTest = After(tDoc.Name(0))
lastName = tDoc.Name(0)
curName = lastName
Open dirLoc & Replace(lastTest) & ".html" For Output As #1
For i = 0 To 6
Print #1, headerArray(i)
Next
While Not tDoc Is Nothing
curTest = After(tDoc.Name(0))
curName = tDoc.Name(0)
If lastTest <> curTest Then
Print #1, footerStr
Close #1
Open dirLoc & Replace(curTest) & ".html" For Output As #1
For i = 0 To 6
Print #1, headerArray(i)
Next
End If
Set dateAssigned = New NotesDateTime(tDoc.Completed(0))
timeDiff = todaysDate.TimeDifference(dateAssigned) / 3600 / 24
If timeDiff <= 10 Then
Print #1, repeatArr(0)
... ...
Print #1, repeatArr(14)
End If
lastName = curName
lastTest = After(tDoc.Name(0))
Set tDoc = tView.GetNextDocument(tDoc)
Wend
Print #1, footerStr
Close #1