Keep Mac Awake

Action cup.and.saucer.fill

action.keep_awake

Prevent your Mac from going to sleep while a workflow runs. The hold stays active until an Allow Sleep node releases it, or until an optional per-node timeout lapses.

The hold uses a public macOS power assertion — no entitlement or special permission is required, and it works inside the sandbox. The assertion is owned by the Watchflows process, so if the app quits or crashes the Mac is free to sleep again automatically (you can never get stuck permanently awake).

The hold prevents idle sleep — the timeout-based sleep that kicks in when you step away. Like every macOS keep-awake tool, it does not override closing the lid (clamshell sleep), choosing Sleep manually, or a critically low battery.

Re-running the same node is idempotent: it releases its own previous hold and applies the current scope and timeout, so exactly one hold is ever active per node.

The node badge reflects the live hold: a timed hold shows a Remaining countdown so you can see exactly how long it has left, while an indefinite hold shows a static Awake badge. While any hold is active, a menu-bar item also appears with a Let it sleep now button — a one-click release from anywhere, even with the main window closed. Deleting the node releases its hold immediately too, so a hold never outlives the node that created it.

Ports

DirectionNameData TypeDescription
InputInputAnyIncoming payload (passed through, with the hold's status merged in)
OutputOutputAnyPayload with awake, scope, and timeoutMinutes added

Configuration

FieldTypeDefaultDescription
scopeDropdownscreenOnKeep screen on prevents both display and system sleep. System awake, let display sleep keeps the Mac running but allows the screen to turn off.
timeoutMinutesNumber0Minutes before the hold auto-releases. 0 means indefinite — the hold lasts until an Allow Sleep node runs, the menu-bar Let it sleep now is clicked, or the node is deleted.

Output Variables

VariableTypeDescription
awakeBooleanWhether a sleep-prevention hold is active (false if the assertion could not be created)
scopeStringThe hold's scope (screenOn or systemOnly)
timeoutMinutesNumberMinutes until the hold auto-releases (0 = indefinite)

Example

Keep the Mac awake while a long export runs, then let it sleep: