1) In the Automation Designer, create a action to execute a script.
2) In the Connection window, highlight the connection, on the left hand side, that you want the script to be executed for.
3) Click the ‘Edit Login Record’ button in the toolbar at the top of the Connection window.
4) Check the ‘Execute Action upon Connection’ option and fill in the action you want executed in the Action field.
5) After doing this, the action selected will be run each time that connection is made.