Programming Event Handlers to Execute Custom Scripts on Plesk Server

Plesk administrators can assign handlers to certain control panel events in Plesk and configure the event handlers to execute commands, for example custom scripts.

Plesk administrators have the ability to monitor Plesk user actions by programming Plesk to automatically execute commands in response to specific control panel events. A control panel event is a successfully completed operation performed on a Plesk object. For the list of Plesk events that can trigger event handlers, see "Plesk Control Panel Events".

To create an event handler and configure it to execute a command, for example a custom script, use Event Manager in Plesk. For each event type, Plesk can pass a set of environmental variables. You have the ability to specify the specific environmental variables to be passed on to event handler commands each time an event handler is activated. For more information on the specific sets of environment variables passed on to event handler commands for different event types, see "Event Parameters Passed by Event Handlers".

This section provides background information about and complete instructions on creating and configuring Plesk event handlers by Plesk administrators.

In this chapter:

Plesk Control Panel Events

Creating Event Handlers

Removing Event Handlers

Composing Event Handler Command

Script Writing Rules