I need to run multiple scripts(5 scripts) via cmd, I want to make sure unless and until the first script finishes the second should not initiate. Thus after first script com
Check out the exec function syntax on php.net.
You will see that exec does not run anything asynchronously by default.
exec has two other parameters. The third one, return_var can give you a hint if the script ran successfully or any exception was fired. You can use that variable to check if you can run the succeeding scripts.
Test it and let us know if it works for you.