Caffeinate doesn't work on Macbook Pro with lid closed?
0
votes
0
answers
707
views
I have an old Macbook Pro with Big Sur (11.7.10) that I use to execute an Applescript that typically runs for 1-2 hours. The first thing I do in this script is
set caffeinatePid to do shell script "caffeinate -d > /dev/null 2>&1 & echo $!"
to prevent the computer from going to sleep (and to be able to kill the caffeinate process at the end of the script) but it doesn't work. The screen sleeps after the set time (3 minutes) and this pauses the execution of the script. The only workaround I have found so far is to connect to the machine using Screen Sharing.
Why does
caffeinate
not work? How should I use it in this situation?
Asked by d-b
(3494 rep)
Sep 20, 2024, 02:24 PM
Last activity: Sep 20, 2024, 02:44 PM
Last activity: Sep 20, 2024, 02:44 PM