2

I there a way in XPiNC (Per can you add that tag) to check if "scheduled local agent" is enabled in a Notes client? Alternatively how to do that in a LotusScript agent. Checking if an agent is active is easy, but that's only one part of the equation

Per Henrik Lausten
  • 21,331
  • 3
  • 29
  • 76
stwissel
  • 20,110
  • 6
  • 54
  • 101

1 Answers1

3

See the Trigger and IsEnabled properties of the NotesAgent class:

TRIGGER_AFTER_MAIL_DELIVERY (2) means "After new mail has arrived"
TRIGGER_BEFORE_MAIL_DELIVERY (6) means "Before new mail arrives"
TRIGGER_DOC_PASTED (3) means "When documents are pasted"
TRIGGER_DOC_UPDATE (5) means "After documents are created or modified"
TRIGGER_MANUAL (4) means "Action menu selection" or "Agent list selection"
TRIGGER_SERVERSTART (8) means "When the Domino server starts"
TRIGGER_NONE (0) is not used

TRIGGER_SCHEDULED (1) means "More than once a day," "Daily," "Weekly," "Monthly," or "Never"

Edit: This forum post suggests checking wether the Notes client is configured to allow running of scheduled agent can be done like this:

if (Clng( Session.GetEnvironmentValue( "Preferences", True )) and &H8000000) > 0 then
    msgbox "scheduled agents allowed"
end if
Anders Lindahl
  • 41,582
  • 9
  • 89
  • 93
  • that wasn't my question. isEnabled is also exposed to LotusScript. What I want to check: is the client enabled to run scheduled agents. If an agent is enabled but no the client it won't run either – stwissel Apr 14 '12 at 09:14
  • I see. Have updated my answer with an example of preferences parsing. – Anders Lindahl Apr 14 '12 at 11:29