How to prevent Macbook pro to sleep if an app is running

I use R studio, and there are some scripts that has 1 or 2 hour running time. I know, that in the Settings > Lock screen tab I can set that never enter sleep mode, but it would be inconvenient many times.

My question is, is there a solution, that if the R studio app is running, it prevents the Macbook to enter sleep mode?

2020 M1 Macbook pro 13"

macOS Ventura 13.4.1


Thanks!

MacBook Pro 13″, macOS 13.4

Posted on Aug 2, 2023 01:09 PM

Reply
Question marked as Top-ranking reply

Posted on Aug 3, 2023 09:01 AM

Balu_99 wrote:

I don't have the same options as you do. This is my Settings window:
"Prevent automatic sleep mode when using a power adapter when the display is off".
The rest of the options are the same.

https://discussions.apple.com/content/attachment/62812349-50ac-425c-9955-dab08c03fe7a

The difference is because you have a portable device and mine is a desktop. That's why you have the item just above the one we're discussing. The last item, however, is the same.


HOWEVER, I've found another setting that you should make sure is unchecked.



We'll get there sooner or later. 🤞

Similar questions

5 replies
Question marked as Top-ranking reply

Aug 3, 2023 09:01 AM in response to Balu_99

Balu_99 wrote:

I don't have the same options as you do. This is my Settings window:
"Prevent automatic sleep mode when using a power adapter when the display is off".
The rest of the options are the same.

https://discussions.apple.com/content/attachment/62812349-50ac-425c-9955-dab08c03fe7a

The difference is because you have a portable device and mine is a desktop. That's why you have the item just above the one we're discussing. The last item, however, is the same.


HOWEVER, I've found another setting that you should make sure is unchecked.



We'll get there sooner or later. 🤞

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 prevent Macbook pro to sleep if an app is running

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