Just let your website start an PM server and then give the commands (Useless resource) But i would do it so inefficiently
Or simply outside the class's scope. Running code outside the class body will make them run immediately after the PHP file is loaded.