Check if scheduled local agents can run in Notes client

风格不统一 提交于 2019-12-11 03:49:27

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!