You can configure the server to automatically run custom commands when specific events occur. You can find a list of the events you can use as triggers in Server events and conditions.
Start the Administrator interface and connect to the server.
At the bottom of the left pane, click the Server tab.
In the left pane, expand the site where you want to trigger the custom command.
Select Event Rules.
In the right pane, click New. The Create New Rule window appears.
In Rule Name, type any name you want.
In the Should be applied when list, select the event you want as a trigger.
Click OK. The Create New Rule window disappears and your rule is displayed in the right pane of the Administrator interface.
In the Specify rule conditions list, choose any conditions that must be met before the event can trigger your command.
In the Specify rule actions list, select the Execute command in folder check box.
In the Specify rule condition and action parameters list, click the pink select text. The Custom Command window appears.
In the Select command list, choose the command you want.
(Optional) In the Specify command parameters box, include any parameters you want. You can also click the items in the Available Tags list to add them as parameters.
In Specify command working folder type the path or click the yellow Browse button to choose the folder where the custom command executable resides.
Click OK.
At the top of the right pane, make sure the Rule Enabled check box is selected.
Customizing event rule email notifications