How to run a procedure on trigger on start of the project?

I have a main() VBScript procedure in my Aveva Edge project, which I want to execute when a trigger happens and when starting the project. I don't know where I can define that. Can anyone help me? Thanks.