问题
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
回答1:
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
来源:https://stackoverflow.com/questions/10151443/check-if-scheduled-local-agents-can-run-in-notes-client