|CAFFEINATE(1)||General Commands Manual||CAFFEINATE(1)|
caffeinate - inhibit desktop idleness while a command runs
caffeinate COMMAND [ARGUMENT...]
Caffeinate runs the given command and prevents the desktop becoming idle while it is run, hence stops screen savers or power-saving activating even if the machine is not being used.
It is usually more convenient to use the fully-automatic caffeine(1); caffeinate may be useful when it is impractical or impossible to run a program in full-screen mode, or to prevent automatic suspend kicking in during a long-running unattended command, such as a system update.
Note, when using caffeinate with cron(1) or another task scheduler, it is important to ensure that the DISPLAY environment variable is correctly set for the task. For many setups, DISPLAY=:0 (or whatever your current value of DISPLAY is) will work; for cron, simply prepend this setting to the command.
Reuben Thomas <firstname.lastname@example.org>