Will a Notification Macro Wake Up Computer?

I have a macro that plays a sound and puts up a notification every hour. This is on a machine with a spinning hard drive.

  1. Will this macro prevent the hard drive from spinning down? (the computer is set to sleep after 1 hour, and the disk is set to sleep when possible)

  2. Will this macro prevent the screensaver and sleep functions from activating (they are set at 20 mins and 1 hour respectively

  3. Will this macro wake the computer up if it is sleeping?

  4. Is there a way to prevent this macro from running when the screensaver kicks in?

Thanks

Hey there, if the computer is awake, macros will continue to execute if they're on a periodic or time of day trigger.

That being said I don't know if macros themselves would prevent the computer from sleeping but that would depend greatly on what the macro is designed to do. None of my 956 macros prevent my computer from sleeping (set to 30 minutes) even though some execute at 15 minute intervals.

Either way, if you want to ensure a macro doesn't fully execute if the screensaver is running, you can use the simple action(s) below. What it does is check to see if the screensaver calculation returns true (indicating it is running), and if it does, it cancels the macro. Note that this will not prevent the macro from being triggered, but it should prevent it from continuing past this point. Simply put it at the beginning of the macro(s) in question.

Likely other folks who are more knowledgeable than I will chime in with more info too.

-Chris

Cancel macro if screensaver is running.kmmacros (1.9 KB)

Hey Tomas,

  • Will this macro prevent the hard drive from spinning down? (the computer is set to sleep after 1 hour, and the disk is set to sleep when possible)

Test and find out.

  • Will this macro prevent the screensaver and sleep functions from activating (they are set at 20 mins and 1 hour respectively.

Test and find out.

  • Will this macro wake the computer up if it is sleeping?

No. Keyboard Maestro is unable to wake a Mac from sleep. You have to use the power manager to do that.

  • Is there a way to prevent this macro from running when the screensaver kicks in?

@cdthomer covered the Keyboard Maestro native method.

-Chris

Thanks for this action to stop the macro when the screensaver is running. Works perfectly

1 Like