Examples: LastRun property (NotesAgent - LotusScript®)
- This script gets the date that the current agent was last run.
For example, if the agent last ran on August 15, 1996 at 11:09:20
AM, the LastRun property returns a variant containing the date-time
value 8/15/96 11:09:20 AM.
Dim session As New NotesSession Dim agent As NotesAgent Dim lasttime As Variant Set agent = session.CurrentAgent lasttime = agent.LastRun
- This script checks if the current database full-text index has
been updated since the current agent last ran. If not, it updates
the index.
Dim session As New NotesSession Dim agent As NotesAgent Dim db As NotesDatabase Set agent = session.CurrentAgent Set db = session.CurrentDatabase If ( agent.LastRun > db.LastFTIndexed ) Then Call db.UpdateFTIndex( False ) End If