OSX comes with the "caffeinate" utility (man caffeinate), maybe use that:
CAFFEINATE(8) BSD System Manager's Manual
CAFFEINATE(8)
NAME
caffeinate -- prevent the system from sleeping on behalf of a utility
SYNOPSIS
caffeinate [-disu] [-t timeout] [-w pid] [utility arguments...]
DESCRIPTION
caffeinate creates assertions to alter system sleep behavior. If no
assertion flags are specified, caffeinate creates an assertion to prevent
idle
sleep. If a utility is specified, caffeinate creates the assertions
on the utility's behalf, and those assertions will persist for the duration
of the
utility's execution. Otherwise, caffeinate creates the assertions
directly, and those assertions will persist until caffeinate exits.
Available options:
-d Create an assertion to prevent the display from sleeping.
-i Create an assertion to prevent the system from idle sleeping.
-m Create an assertion to prevent the disk from idle sleeping.
-s Create an assertion to prevent the system from sleeping. This
assertion is valid only when system is running on AC power.
-u Create an assertion to declare that user is active. If the
display is off, this option turns the display on and prevents the display
from going
into idle sleep. If a timeout is not specified with '-t'
option, then this assertion is taken with a default of 5 second timeout.
-t Specifies the timeout value in seconds for which this
assertion has to be valid. The assertion is dropped after the specified
timeout. Timeout
value is not used when an utility is invoked with this command.
-w Waits for the process with the specified pid to exit. Once the
the process exits, the assertion is also released. This option is ignored
when
used with utility option.
EXAMPLE
caffeinate -i make
caffeinate forks a process, execs "make" in it, and holds an
assertion that prevents idle sleep as long as that process is running.
SEE ALSO
pmset(1)
LOCATION
/usr/bin/caffeinate
Darwin November 9, 2012
Darwin
On Tuesday, February 22, 2022 at 10:32:29 PM UTC+1 [email protected] wrote:
> Hi, Dima, Good question. See below...
>
> > On Feb 22, 2022, at 01:32 , Dima Pasechnik <[email protected]> wrote:
> >
> > On Tue, Feb 22, 2022 at 12:13 AM 'Justin C. Walker' via sage-release
> > <[email protected]> wrote:
> >>
> >>
> >>
> >>> On Feb 20, 2022, at 06:30 , Volker Braun <[email protected]> wrote:
> >>>
> >>> As always, you can get the latest beta version from the "develop" git
> branch. Alternatively, the self-contained source tarball is at
> http://www.sagemath.org/download-latest.html
> >>
> >> Built w/o problems on macOS 10.15.7 (2019 MBP, 8-core Core i9).
> >>
> >> All tests (‘ptestlong’) passed!
> >
> > I wonder whether you have non-standard power settings on to prevent
> timeouts
> > some (most) people see while testing on macOS.
>
> My power settings, for this system are:
> o Prevent computer from sleeping automatically when display is off
> o Wake for Wi-Fi network access
> and the display is set to turn off after ~11 minutes.
>
> However, in the past, I found that the system would sleep regardless of
> the settings (and timeouts would abound :-})
>
> My low-tech solution was to set one “hot corner” to “disable the screen
> saver”.
>
> Now, I just push the cursor to that hot corner when building sage, and
> lo…no timeouts or sleeping on the job.
>
> I can’t explain why disabling the screen saver has that effect, but Apple
> moves in mysterious ways.
>
> HTH
>
> Justin
>
> PS: I have to use this trick on both laptops and my iMac(?!).
>
> --
> Justin C. Walker, Curmudgeon-At-Large, Director
> Institute for the Enhancement of the Director's Income
> --------
> The path of least resistance:
> it's not just for electricity any more.
> --------
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"sage-release" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-release/d56a93ac-a9b3-4cc7-985b-d183cecab797n%40googlegroups.com.