In MicroStation V8i and earlier you can run (though UCMs are limited) MS_EXIT. We would suggest if in MicroStation V8 or later to consider using MicroStation VBA and OnProjectLoad method to set events that you have interest in; like design file open/close, model change events, etc. You can simply search the Bentley Communities for "OnProjectLoad" in the top middle pane to see plenty of examples and discussions on a given topic.
HTH,
Bob