How to Wake a Sleeping Mac in Automator?

I have an Automator "Watch me Do" process that closes down an app at a particular time each day. The problem is this is often when the Mac is sleeping. If so, the process doesn't run, but shows an error message, something like "Cannot complete the task...". I figure there must be a way to wake the Mac via Automator, but I don't see a command to do that.


I thought about maybe scheduling it through Energy Saver, but that would not only wake the computer, but turn it on if it's off. If the computer is off, I do not need to run the process.


I'm not proficient with AppleScript and terminal processes, so I'm hoping I can solve this completely through Automator.


Thanks in advance for your help.

iMac 21.5", macOS 10.15

Posted on Nov 16, 2019 9:55 AM

Reply
10 replies

Nov 18, 2019 6:44 AM in response to Camelot

Well... First off, Automator DOES work for certain processes when the computer is asleep, as it turns on apps for me every night while I'm asleep and so is the computer. The context is that I live in a remote area and have limited bandwidth. So, for instance, I have Automator turn on Dropbox for me at 2AM when the bandwidth is cheaper, and I want to shut it off at 8AM when rates go up. The problem is once the newest version of Dropbox is opened it doesn't appear as an app, but as an add-on extension, which Automator does not recognize as an app when the "Quit Application" command is used. So... I used the "Watch Me Do" command in Automator to quit Dropbox, which works just fine, unless the computer is sleeping. Automator will not perform "Watch Me Do" on a sleeping computer. So, long story short... I need a command to wake the computer so it can perform that function. Does this make better sense?

Nov 17, 2019 10:16 PM in response to Buffsters

I think the original post needs some clarification as to the goal here.


From what I can tell the original ask is pretty moot since the app isn't running is the system is asleep. What am I missing here?


Also, caffeinate will prevent your system from sleeping, but that wasn't the original ask.


You can use the command line tool pmset to schedule a repeating event to wake (and not power on) your system at a set time, which could be used to ensure the system is running when your quit script runs, but it doesn't answer why you need to quit the app when the system is asleep anyway.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to Wake a Sleeping Mac in Automator?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.