Tips and Best Practices for Event Triggers
• Check to see if there is a trigger script in the trigger library that already does what you need.
• As a starting point, modify an existing trigger script that is close to what you need.
• Build and test trigger scripts starting small, gradually adding more logic.
• Log script information to the server log as frequently as possible to help debug.
• Use an editor that supports JavaScript syntax highlighting to catch simple bugs.
• Keep system security in mind. Triggers run on the server under the permissions of the administrator and have the potential to affect file and system security.
• Try to limit the number of triggers. Triggers affect the duration of the command from the client’s perspective and can degrade performance. The more triggers on an event (or series of events) the longer the user has to wait for the event to complete.
• Trigger scripts that take a long time to run degrade server performance. Ensure your trigger scripts are concise.