APPLICATION DESIGN


Triggering an agent on a schedule
Once you have created an agent, you must choose whether to trigger the agent on an event or on a schedule. To trigger an agent on a schedule:

1. On the Basics tab of the Agent Properties box, click "On Schedule."

2. In the list next to the Schedule button, choose one of the schedules listed in the following table.

3. Once you make a choice from list, click the Schedule button to display the Schedule dialog box. You can add more details about running the agent. For example: 4. In the same Schedule dialog box, you also specify the servers on which you want the agent to run. You can choose from the "Run on" list. Alternatively, you can have users choose the server.
Server agent runs onUse
LocalThe agent runs only on the client. Use this option to schedule agents to run in the background on the local Notes client. The database containing the agent must be a local database. The agent will run with the rights of the current IBMR LotusR NotesR ID.

Note that for scheduled agents to run on the local Notes client, the user must first select "Enable scheduled local agents" on the Basics tab of the User Preferences dialog box (Choose File - Preferences - User Preferences).

Any serverThe agent runs on any server that the agent is available on. When agents run on multiple servers and they are changing documents in databases that are replicated, you should specify the servers they run on to prevent replication conflicts. Then, set up the databases' replication schedules so they donft interfere with the agentsf scheduled runs.

Note that this option does not cause problems if you are using copies (instead of replicas) of the database.

Specific serverThe agent runs only on the single server you select from the list of available servers.
Choose when agent is enabledChecking this option prompts users to select a server when the agent is enabled. This option is useful for distributing agents in ready-to-use applications.
5. From the Target pull-down list, select the documents in the database the agent will run on. You have two choices:
If you paste, modify, or enable a scheduled agent, the agent will run immediately if it has missed running on the day of the changes.

Note Agents are scheduled according to the interval you set up, not the exact time of day. For example, if you schedule an agent to run hourly, it runs about one hour after the last time it ran.

Agents that miss their scheduled run

If a scheduled agent is edited (for example, enabled, modified, saved, or pasted), it will usually run immediately if it has missed its scheduled run. This is true for agents scheduled monthly and weekly. It is partially true for agents scheduled daily.

If a agent scheduled to run daily misses its scheduled run because it was disabled, it will run if it is enabled within half an hour of the scheduled run. However, If a scheduled agent is saved, pasted, or modified, it will run immediately if it has missed its schedule.

See Also