https://github.com/sergeiown/shutdown_timer
This project provides a simple and efficient batch script to schedule the shutdown of the windows operating system after a user-defined number of minutes. It also contains a utility to create a shortcut to the main script in the Start menu.
https://github.com/sergeiown/shutdown_timer
batch-script powershell shutdown shutdown-timer timer windows
Last synced: 27 days ago
JSON representation
This project provides a simple and efficient batch script to schedule the shutdown of the windows operating system after a user-defined number of minutes. It also contains a utility to create a shortcut to the main script in the Start menu.
- Host: GitHub
- URL: https://github.com/sergeiown/shutdown_timer
- Owner: sergeiown
- License: mit
- Created: 2024-08-24T06:47:35.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-24T08:30:01.000Z (over 1 year ago)
- Last Synced: 2025-04-06T10:13:06.374Z (11 months ago)
- Topics: batch-script, powershell, shutdown, shutdown-timer, timer, windows
- Language: Batchfile
- Homepage: https://github.com/sergeiown/Shutdown_Timer
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [ Shutdown Timer](https://github.com/sergeiown/Shutdown_Timer)
This project provides a simple and efficient batch script to schedule a system shutdown after a user-defined number of minutes. It also includes a utility script to create a shortcut to the main script in the Start Menu.
## Motivation
Windows does not include a straightforward, user-friendly way to schedule a shutdown with a countdown timer by default. While some third-party tools exist, they are often overly complex, filled with unnecessary features, or come with large installation sizes. This script offers a lightweight and direct solution.
## Features
- **Shutdown Scheduling:** Input the desired number of minutes, and the system will automatically shut down after that time.
- **Input Validation:** Ensures that the user input is a valid number within the specified range.
- **Countdown Display:** Shows a live countdown timer in the console, updating every second.
- **Notification:** A PowerShell message box confirms the timer start and minimizes all open windows.
- **Shortcut Creation:** A utility script that creates a Start Menu shortcut for easy access to the shutdown timer, including an optional hotkey assignment.
## Requirements
- **Operating System:** Windows
- **PowerShell:** Pre-installed on most Windows systems (used for message box notifications).
- **Administrator Rights:** Required to initiate a shutdown.
## Installation
- **Clone the repository** or download the scripts:
```sh
git clone https://github.com/sergeiown/Shutdown_Timer.git
```
## Usage
| | |
|:------|:----------:|
| **Run `shutdown_timer.bat`:**
- Double-click `shutdown_timer.bat` or run it from the command line.
- The script will prompt for the number of minutes until shutdown.
- After validating the input, the countdown will start, and the system will shut down when the timer expires. |  |
| **Run `startmenu_shortcut.bat`:**
- This will create a shortcut named "Shutdown Timer" in your Start Menu for easy access.
- The shortcut will be linked to the `shutdown_timer.bat` script, with an appropriate icon.
- **Hotkey:** By default, the shortcut is set with the `Ctrl + Alt + T` combination. You can quickly access the Shutdown Timer by pressing these keys. |  |
## License
This project is licensed under the MIT License. See the [LICENSE](https://github.com/sergeiown/Shutdown_Timer/blob/main/LICENSE) file for more details.