Keep your Mac awake while an app, process or download runs
Keep your Mac awake until an app quits, a process exits or a download finishes with Glowmoth, plus saved apps, process names and watched folders.
Updated 8 min read
On this page
Glowmoth can keep your Mac awake while a specific app is running, a process is working or a download is coming in, then let it sleep as usual once that work is done. For a one-time job, right-click the moth icon and choose Keep Awake While. For something that should keep the Mac awake every time, add it under Settings ▸ Automation.
The two approaches differ like this:
- One-off, from the menu bar. Keep Awake While covers one app, process or download, once. It isn't saved.
- Saved, in Settings. The Apps, Processes and Folders lists in Settings ▸ Automation apply every time their condition is true.
| You want to… | Use | Ends when | Saved? |
|---|---|---|---|
| Stay awake until one open app quits | Keep Awake While ▸ the app | The app quits | No |
| Wait for one process or PID | Keep Awake While ▸ A Process Runs… | The process exits (within about 1 second) | No |
| Wait for one download | Keep Awake While ▸ This Download Finishes | The folder has been quiet for 2 minutes | No (the folder is remembered) |
| Stay awake whenever an app is open or in front | Settings ▸ Automation ▸ Apps | The app quits or leaves the front, plus an optional wait | Yes |
| Stay awake whenever a named process runs | Settings ▸ Automation ▸ Processes | No process with that name is running | Yes |
| Stay awake whenever a folder receives a download or copy | Settings ▸ Automation ▸ Folders | 2 minutes after the folder goes quiet | Yes |
Before you start
- License or trial. Glowmoth keeps nothing awake without an active trial or MacSuite license. When unlicensed, the right-click menu shows Activate Glowmoth….
- Automatic mode. Every reason on this page is an automatic reason. In Manual mode (the Automatic | Manual control in the panel, or Keep awake automatically turned off in Settings ▸ Automation), Glowmoth ignores all of them and only your own session counts.
- Folder access. The first time Glowmoth watches a folder in Downloads, Desktop or Documents, or on an external or network drive, macOS asks for permission. Glowmoth always has you pick the folder first, so the prompt matches what you chose. See Permissions Glowmoth asks for.
Keep your Mac awake while one app is running
- Right-click (or Control-click) the moth icon in the menu bar.
- Choose Keep Awake While.
- Under An App Is Running, choose the app.
The submenu lists every open regular app with its icon. A checkmark marks an app you've already chosen. If no apps are open, it shows No Apps Open.
The reason appears in the panel as "<App> is running" and ends when that app quits. One-off app reasons only track whether the app is running: there's no In Front option and no wait after the app quits. If you need either, save the app in the Apps list (see below).
Wait for a specific process or PID
Use this for a single job such as a script, an export or a build running in Terminal.


- Right-click the moth icon and choose Keep Awake While ▸ A Process Runs….
- In the Keep Awake While a Process Runs window, type in the search field (Name, PID or command) to filter the list.
- Select the process and click Keep Awake (or press Return). Double-clicking a row also chooses it. Cancel (Esc) closes the window.
The list shows your own processes with their name, command line, CPU % and PID. It refreshes every 2 seconds, busiest first. The footer reads "Ends when the process exits."
- Another user's process: it isn't listed, but you can type its PID. Glowmoth then offers it as Another user's process.
- Ending: the reason ends within about 1 second of the process exiting. In the panel it reads "
<name>is running (PID n)". - Beep: if the process has already exited when you choose it, Glowmoth beeps.
- While the list loads you'll see Loading…. If your search matches nothing, you'll see No matching processes.
From Terminal you can skip the picker. glowmoth wait <pid> holds the Mac until that process exits, and glowmoth run -- <command> holds it while a command runs and returns the command's exit code. See the glowmoth command-line tool.
Stay awake until a download finishes
- Right-click the moth icon and choose Keep Awake While ▸ This Download Finishes.
- The first time, Glowmoth asks "Choose the folder your download is saving to." The picker starts in
~/Downloads. Choose the folder and click Watch Folder.


After that, This Download Finishes starts right away with the same folder. The menu item shows a checkmark while it's waiting, and the panel shows "Waiting for <Folder> to finish".
How it decides the download is done
- It always holds the Mac for at least 2 minutes.
- After that, it holds until the folder has been quiet for 2 minutes. Then the reason ends and the Mac can sleep as usual.
Changing the remembered folder
There's no setting to change the folder. Glowmoth asks again only if the remembered folder disappears, or after Settings ▸ Advanced ▸ Reset all settings. A reset also clears every other preference, including your rules and saved lists.
If a download saves somewhere else, add that folder to the Folders list instead (see below).
Save apps that always keep the Mac awake
- Open Settings: right-click the icon and choose Settings…, or click Settings… in the panel footer (⌘, / Command-Comma).
- Go to Automation and find Apps. When the list is empty it reads "Stay awake while an app is open or in front."
- Click Add App and pick an open app, or choose Choose App… to pick any app in
/Applications. - Set While and Then Wait for that app.
| Option | Choices | Default | What it does |
|---|---|---|---|
| While | Running, In Front | Running | Running holds while the app is open. In Front holds only while it's the frontmost app. |
| Then Wait | No Delay, 1 Min, 5 Min | 1 Min | Keeps the reason that long after the app quits or leaves the front. Relaunching the app within the wait cancels the end. |
Each row shows a summary such as "While running, +1 min". In the panel the reason reads "<App> is running" or "<App> is in front". Glowmoth reacts to system app notifications rather than polling.


Keep awake while a named process runs
Use this for command-line tools you run often, such as ffmpeg, xcodebuild or rsync.
- In Settings ▸ Automation, find Processes.
- Type the executable name in Add a process name, like ffmpeg.
- Click Add.
How matching works:
- Names are matched case-insensitively against the executable's file name.
- Processes started later count too, so you add the name once.
- Glowmoth checks every 5 seconds, and only while at least one process name is in the list.
- It sees the processes your user account can see.
- The reason reads "
<name>is running".
For a single run, the footer points you to the one-off picker: "Matched by name, including ones started later. For a single run, use Keep Awake While in the menu."
Watch folders for downloads and copies
- In Settings ▸ Automation, find Folders. The caption reads "Stay awake while a download or copy into a folder is in progress."
- Click Add Folder…, choose the folder, and click Watch Folder.


A watched folder counts as busy in either of these cases:
- It contains a partial download file:
.download(Safari),.crdownload(Chrome),.part(Firefox),.opdownload(Opera) or.partial. - A file in it grew, or a new non-empty file appeared, in the last 60 seconds. This covers copies and downloads that don't use a partial-file extension.
The reason ("<Folder> folder is busy") ends 2 minutes after the folder goes quiet.
Glowmoth watches the folder with file-level FSEvents and only checks file names and sizes. It never reads file contents. The Folder Busy condition in automatic rules uses the same busy test.
How these reasons behave once they're running
- Where you see them: each reason appears in the panel's Held By list. When only automatic reasons are holding the Mac, the menu bar icon shows the Automatic state (ring bulb).
- Ending one early: click the ✕ on its row. One-off reasons are removed. Saved apps, processes and folders stay ended until their condition turns false once (for example, until the app quits), then work again next time.
- The display may sleep. App, process and folder reasons only block idle system sleep. To keep the screen on, start your own session with Keep Display On, or use a rule with Keep the display on turned on.
- Stop Everything ends your session and suspends all automatic reasons until you next start a session or Glowmoth relaunches.
- Safety limits still apply. A low-battery or heat pause releases the Mac for every reason. See battery and heat safety limits.
- End actions: when the last reason ends on its own (an app quits, a download finishes), the action set in Settings ▸ Sessions ▸ When a Session Ends runs. See notifications and end actions.
Do one-off reasons survive a relaunch?
No. Anything started from Keep Awake While (an app, a process or a download) is gone after you quit and reopen Glowmoth. Only the download folder is remembered.
The Apps, Processes and Folders lists are saved and keep working after a relaunch. They aren't included in Settings ▸ Advanced ▸ Settings file exports, so add them again on a new Mac.
Troubleshooting
The Mac slept anyway. Check these in order:
- The panel shows Manual. Switch back to Automatic.
- You used Stop Everything recently. Automatic reasons stay suspended until you start a session or relaunch Glowmoth.
- The panel title says "Paused". A battery or heat limit paused it.
- The trial or license has ended. The panel shows "License needed".
- You closed a laptop's lid or chose Sleep from the Apple menu. Glowmoth only prevents idle sleep. For the lid, see closed-lid mode.
The app isn't in the Keep Awake While menu. That menu lists only apps that are open right now. To add an app that isn't open, use Choose App… in Settings ▸ Automation ▸ Apps.
The process isn't in the picker. The picker lists only your own processes. For another user's process, type its PID. If Glowmoth beeps when you choose a process, that process has already exited.
This Download Finishes is watching the wrong folder. The remembered folder can't be changed in Settings. Add the right folder to Settings ▸ Automation ▸ Folders instead.
A watched folder never stops being busy. A leftover partial file (for example, a .crdownload from a cancelled download) keeps the folder busy, and so does a file that keeps growing, such as a log. Delete the partial file, or watch a more specific folder.
Glowmoth can't watch the folder. macOS blocked access. Open System Settings, search for "Files and Folders", and allow Glowmoth for that location.