Retired Documents Library Developer
Search

 

This manual page is for Mac OS X version 10.9

If you are running a different version of Mac OS X, view the documentation locally:

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • To learn how the manual is organized or to learn about command syntax, read the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Developer Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.




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] [utility] [argument ...]

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 util-ity's utility's
     ity's execution. Otherwise, caffeinate creates the assertions directly, and those assertions will per-sist persist
     sist 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 sys-tem system
             tem 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 speci-fied specified
             fied 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.

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

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation with the feedback links below.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.

Feedback