Technical Anshu
Tutorials Blog
⏲️ Power Command

Shutdown and Restart Timer Using the shutdown Command

A big download will finish at 2 AM, a render is running, or the kids’ PC should switch off at ten. Windows can shut itself down on a timer — no extra software, just one command.

✍️ Technical Anshu🪟 Windows 10 / 11⏱️ 2 minute setup
🎥 This command is part of the 60 Windows Commands video — watch the full toolkit in action

The shutdown command is the power switch of the command line. With one switch it shuts down or restarts immediately; with a timer value it becomes a countdown you can set and cancel; and with a computer name it can restart another PC on the network — the trick IT staff use on office machines after hours. This guide covers each form with its exact syntax, and is honest about what remote shutdown needs before it will work.

Command Prompt — a one-hour shutdown timer
C:\Users\Admin> shutdown /s /t 3600 (Windows shows a notification: "You're about to be signed out — Windows will shut down in 60 minutes.") Changed your mind? C:\Users\Admin> shutdown /a The logoff is cancelled — the timer is gone.

👆 3600 is the delay in seconds — one hour. The /a command is the cancel button, and it only works while the timer is still counting down.

1

Timed Shutdown and Restart — /s /t and /r /t

  1. Shutdown after a delay: shutdown /s /t 3600 — /s means shutdown, /t is the delay in seconds (3600 = 1 hour, 1800 = 30 minutes, 7200 = 2 hours)
  2. Restart instead: shutdown /r /t 0 — /r means restart, and 0 seconds means right now
  3. Maximum delay is 315,360,000 seconds (10 years), so any realistic timer is fine
  4. Common daily uses: shutdown after a download or backup finishes, a fixed bedtime shutdown for a shared PC, or a delayed restart after installing something
  5. Tip: set timers from the Run box (Windows + R) — no need to open Command Prompt at all
2

Cancel It — shutdown /a

  1. Mistake, or the plan changed? Run shutdown /a — /a means abort
  2. Windows confirms with a notification that the scheduled shutdown was cancelled
  3. The one rule: /a works only while the timer is still running. Once the countdown reaches zero and the shutdown begins, there is nothing left to cancel
  4. Force-close stubborn apps during a shutdown with the /f switch: shutdown /s /f /t 0 — use it knowing unsaved work in those apps will be lost
3

The Other Switches Worth Knowing

  1. shutdown /l — sign out (log off) the current user immediately. It cannot be combined with a timer
  2. shutdown /h — hibernate the PC (if hibernation is enabled)
  3. shutdown /r /o /t 0 — restart into the Advanced Options (recovery) menu — the technician’s shortcut when a PC will not behave
  4. shutdown /i — opens a small graphical Remote Shutdown dialog where you can pick computers and options with the mouse

Full official list any time: shutdown /? prints every switch with its meaning.

🔴 Remote shutdown — the honest requirements: shutdown /m \\OfficePC /r /t 0 restarts another PC on the network, but only when you have administrator rights on that PC and its firewall and Remote Registry service allow it. On a default home PC it usually fails with "Access is denied" — that is Windows protecting the other machine by design, and the fix is proper admin configuration, not a trick. Save your own work first, too: a forced shutdown closes apps without asking.

🎥 Watch the Complete Video

One command, many switches — the video’s toolkit wraps these power options into its menu along with the other 60 commands.

▶️ Watch Full Video
❓ Frequently Asked Questions

How do I shut down the PC after 30 minutes automatically?

Run shutdown /s /t 1800 — the number is seconds, so 1800 seconds is 30 minutes. Windows shows a notification confirming the scheduled shutdown. If plans change before the time runs out, cancel with shutdown /a.

Why did shutdown /a say there is no shutdown in progress?

That message means no timed shutdown was active — either it was never set, it was already cancelled, or the countdown had finished. Run the timer command again first; /a only cancels a countdown that is actually running.

Does a scheduled shutdown survive a restart?

No. If the PC restarts or shuts down before the timer ends, the pending timer is discarded. For a shutdown that must happen every day at a fixed time regardless, use Task Scheduler to run the shutdown command on a daily schedule instead of a one-time timer.

This guide is based on the Technical Anshu 60 Windows Commands video • Stuck on any step? Ask in the video comments — you will get a reply there 🙏