Automatic script execution on MT5 event (close, account disconnect, etc...)

 

Hello, I developped a script to feed an Excel report. How can I automate this script execution ? I'd like that it runs when I disconnect from an account (just before the disconnect) and when I close Meta Trader.