I had created a custom script which update my database. After completion of database update, I want to execute the Magento CLI commands by adding custom functions in my custom script.
The script should run commands as below:
1) setup:upgrade 2) content:deploy 3) reindex 4) flush 5) 777 permissions for var/ pub/ generated/ Directories
How could I do it using a custom script in Magento 2.3.x?