How to stop for loop when receive serial strings from serial port.

So don't do that. Make loop() do both. If there's in incoming character, look at it. If there's a command to be executed then do that too.