"Some macros have been running for a long time"

Occasionally, one (me) stumbles upon a random macro still running while checking the status menu for something else. Further, one (me) can botch a new macro and not realize it is still running until waking up to a hot and nearly dead MBP.

Is there a practical way to be alerted if any macro is still running for hours?

To be clear, this is user error and I am aware that some macros run for a long time by design. Just would have been nice to get a "Hey buddy, this macro has been running for hours."

I am not aware of any way to easily receive a notification of a macro running for a long-time, as that would likely involve designing each macro to do that on it's own.

The best way to prevent this is to adjust your timeout settings on your actions. To make this easier for myself, I saved a lot of my most commonly used actions that involve timeouts as favorites, with the timeouts set to 5, 10 or 15 seconds that way when I build new macros I can insert those "favorited" actions and automatically have them cancel/continue or whatever after a short time period. This ensures that I don't have runaway macros doing their thing well into the witching hour.

Alternatively, you could create a global cancel all macros macro (AKA the "oh crap!" macro) and set it to trigger at a certain time of the day/night to ensure your MacBook doesn’t run macros all night long. But that's a bandaid solution at best.


Good suggestions to ponder.

Style points awarded for the “oh crap” macro.

1 Like

Haha yea fortunately I’ve never had any major disasters but there have been times when I’ve been REALLY glad to have it :sweat_smile:

Is there a way to list macros that are running? That would be useful in itself, and potentially as a part of an alert system.

Off the top of my head I can’t think of any way except checking the menu bar icon under the cancel macro item. That lists all currently running macros (and allows you to cancel them individually or all together).

For instance, see this topic where it is definitively stated that not even GUI AppleScripting can reliably retrieve a list of currently executing macros.

Okay, thanks!

If you haven't changed KM preferences, the KM icon in the menu bar should "flash" when a macro is running. So if it keeps flashing, something is probably wrong.

And yes, have an "Oh Crap!" macro on hand for quick access. For me, on my extended keyboard, it's Control+F19, which means it's the bottom-left key and the top-right key, so no thinking is required to remember how to launch it, which is especially useful if you get a runaway macro creating multiple files or folders. Not that I've ever done anything like that. Nope, not me. :laughing:

Hey, Dan.

I use Bartender, and I have the KM icon set to "Show for Updates" so there is an even bigger visual cue (the icon goes appears when a macro is running). However, I've been using the classic icon all this time, which is a bit more subtle when running. Thanks for prompting me to look at that.

My "Oh Crap!" macro is mapped to Hyper-K, and I feel your pain on runaway folders (not that you've ever done that). I'm not going as far as scheduling it run nightly, but I thought @cdthomer had a creative idea to programatically declare "Oh Crap!" on a daily basis. :joy:

Glad to help.

but I thought @cdthomer had a creative idea to programatically declare "Oh Crap!" on a daily basis. :joy:

I don't personally like that idea, and I'll tell you why. There's nothing wrong with it per se, but if it's something that needs to be scheduled regularly, then that means you have another problem. I'd rather deal with the problem directly. But that's just me. :slight_smile:

1 Like