Mastering the Command Line: Create a Custom Auto Shutdown Timer Without Extra Software

Written by

in

How to Set Up Auto Shutdown on Windows and Mac (Step-by-Step)

Setting your computer to turn off automatically is a great way to save energy, finish long downloads overnight, or ensure you don’t stay up too late working. Whether you use Windows 11, 10, or macOS, you can schedule shutdowns using built-in tools without needing extra software. How to Set Up Auto Shutdown on Windows

Windows offers two main ways to do this: a quick timer for one-off situations and Task Scheduler for recurring daily or weekly shutdowns. Method 1: The Quick Timer (One-Time)

This is best if you want your PC to shut down after a specific number of seconds. Press Windows Key + R to open the “Run” dialog box. Type the following command: shutdown -s -t [seconds]. Replace [seconds] with the time you want. For example: 30 Minutes: shutdown -s -t 1800 1 Hour: shutdown -s -t 3600 2 Hours: shutdown -s -t 7200

Click OK. A notification will appear confirming the scheduled time. To Cancel: Open “Run” again and type shutdown -a. Method 2: Recurring Schedule (Daily/Weekly)

Use the Windows Task Scheduler for a permanent automated schedule. How to Schedule Automatic PC Shutdown in Windows