---
title: "Discussion on \"Prompt: Create a simple script to prevent macos from going to sleep\" | Hashnode"
description: "Discussion on \"Prompt: Create a simple script to prevent macos from going to sleep\". Learn how to use macOS's caffeinate command to easily prevent sleep, including scripts for indefinite or timed durations"
url: "https://hashnode.com/posts/prompt-create-a-simple-script-to-prevent-macos-from-going-to-sleep/6934ae0bc6a14ad30b073f0f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Prompt: Create a simple script to prevent macos from going to sleep](https://promptmata.hashnode.dev/prompt-create-a-simple-script-to-prevent-macos-from-going-to-sleep?utm_source=hashnode&utm_medium=feed)

Learn how to use macOS's caffeinate command to easily prevent sleep, including scripts for indefinite or timed durations

Dec 6, 2025 · 1 min read · promptmata.hashnode.dev  
Read the article

-   [#caffeinate](https://hashnode.com/tag/caffeinate)
-   [#script](https://hashnode.com/tag/script)
-   [#macos](https://hashnode.com/tag/macos)
-   [#sleep](https://hashnode.com/tag/sleep)
-   [#tech](https://hashnode.com/tag/tech)

## Written by

[Aiman Shaharuddin](https://hashnode.com/@psyntium)

@psyntium · Kuala Lumpur, Malaysia

  
[View profile](https://hashnode.com/@psyntium)

Seeing the world one prompt at a time {<●>}

I’m Aiman, and I see the world through prompts. IBM by day, prompt tinkerer by night. Here I share experiments, failures, wins, and the random magic that happens when curiosity meets AI. Welcome to my lens of ideas {&lt;●&gt;}.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
