"Execute shell script" and energy usage

Hi guys.

I have a script I run to run different instances of Chrome with different profiles. This comes handy with many things, including web development of keeping related sites segregated.

The problem with this and KM is that, if I use "Execute shell script" to launch it, I believe MacOS identifies Chrome as the "Keyboard Maestro Engine", because while it's running "Keyboard Maestro Engine" shows in the energy monitor as using significant energy. If I kill Chrome, it goes away.

How can I get the process to be identified as Chrome instead of KM? I also launch Firefox and Brave through this method and need to be able to distinguish between them. I tried using a combo of exec and &, but to know avail:

#!/usr/bin/env bash
exec $HOME/bin/randomchrome.sh & 

Any tips would be greatly appreciated.

Thanks,
d1rewolf

You need to ensure that:

a) the macro finished and does not wait around for the result

and

b) the application continues to run.

The & in the command should accomplish (b), but unless the macro complete Keyboard Maestro will continue waiting for the result.

Configure the Execute a Shell Script action to execute Asynchronously, that will probably be sufficient, although you might also have to break all the pipes to the application.

Thanks Peter. Running Asynchronously is the first thing I checked and made sure I did, so that doesn't seem to be the problem.

Perhaps it's a red herring. Is there a way to see what the KM Engine thinks it's spending its time on?

Thanks,
d1rewolf