Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A PowerShell script that runs for a specified duration (default 30 minutes), continuously displaying a countdown & keeping the computer awake.

License

notbadrabbt/time

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Time - A Powershell Script for Keeping Your Computer Awake

A PowerShell script that runs for a specified duration (default is 30 minutes), displaying a live countdown & keeping your computer awake by periodicly sending 2 Scroll Lock keystrokes.

Description

This script is designed to prevent your computer from going to sleep during critical operations or long-running tasks. It does so by:

  • Running for a user-defined duration: Defaults to 30 minutes unless a different time is specified.
  • Displaying a live countdown timer: Shows the remaining time in hours, minutes, and seconds.
  • Simulating activity: Sends the Scroll Lock keystroke twice at random intervals (between 5 and 60 seconds) to prevent the system from entering sleep mode.

Usage

  1. Open PowerShell.
  2. Run the script with an optional time parameter (-t), which sets the duration in minutes: .\KeepAwake.ps1 -t 45

License

This project is released under the Unlicense.

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

For more details, please visit https://unlicense.org/.

Contributing

Contributions, issues, and feature requests are welcome. If you have suggestions or improvements, please feel free to fork the repository and submit a pull request.

Disclaimer

This script is provided as-is. Use it at your own risk; the author is not responsible for any damages or unintended consequences resulting from its use.

About

A PowerShell script that runs for a specified duration (default 30 minutes), continuously displaying a countdown & keeping the computer awake.

Resources

License

Stars

Watchers

Forks