Windows sleep, explained

Does Windows 10 & 11 have a sleep timer?

Short answer: not a real one. Windows 10 and 11 only have an idle-based setting — "sleep after X minutes" — which waits for the PC to be inactive first. It's not a countdown, and it won't fire while a download, video, or remote session keeps the machine busy. There is a built-in countdown for shutting down, but none for sleeping. Here's how both work, how to set up a laptop, and how to schedule sleep automatically by time of day — free for up to 3 rules.

"Sleep timer" can mean two different things

Sleep after X minutes of no use? That's the sleep timeout: Settings → System → Power & battery (Windows 10: Power & sleep), or powercfg /change standby-timeout-ac 30. A laptop has a second value for battery. Every sleep setting, explained →

Shut down N minutes from now? In Command Prompt, run shutdown /s /t 1800 — the time is in seconds, so 1800 is 30 minutes. Changed your mind? shutdown /a cancels it.

Download PowerDoze free Why won't my PC sleep? →

What Windows actually gives you

When people search for a "sleep timer," they usually picture a countdown like a TV's: "go to sleep in 30 minutes, no matter what." Windows doesn't have that for sleep. What it has is an idle timeout under Settings → System → Power & battery (Windows 11) or Power & sleep (Windows 10). On Windows 11 expand Screen and sleep (newer builds: Screen, sleep, & hibernate timeouts); the sleep label is Make my device sleep after (some builds still say Put my device to sleep after). The key word is after being idle — the clock only counts while you're not using the PC, and it resets the moment anything keeps it busy.

That's why a movie, a long download, or a remote desktop session can keep your PC awake well past the sleep time you set — Windows sees activity and never starts the countdown. If that's your actual problem, see why Windows won't sleep and how to find what's blocking it.

Your options — and where each falls short

What you want How to do it The catch
Sleep after some idle timeSettings → Power & battery, or powercfgIdle-based — won't sleep during activity
A laptop that sleeps differently on battery and plugged inSame settings page, two values; standby-timeout-dc / -acEasy to set only one of the two
A one-off "shut down in 30 min" countdownshutdown /s /t 1800 in Command PromptShuts down, not sleep; closes apps without asking
A one-off "sleep in 30 min" countdownNot built into WindowsThe idle timeout is the closest thing
Different sleep behavior by time of dayPowerDoze scheduled power modesFree tier caps at 3 rules

Change the idle sleep timeout (built-in)

Open Settings → System → Power & battery (or Power & sleep on Windows 10). On Windows 11 expand Screen and sleep (newer builds: Screen, sleep, & hibernate timeouts) and set Make my device sleep after — some builds still say Put my device to sleep after. On Windows 10, under Sleep, it's When plugged in, PC goes to sleep after. Prefer a command line? Run powercfg /change standby-timeout-ac 30 for plugged-in, or standby-timeout-dc for battery (minutes). On a laptop, set both — more under "On a laptop there are two sleep timers".

Best for: Setting how long the PC waits when you walk away. Limit: It's a single idle threshold, not a countdown, and activity keeps it awake.

On a laptop there are two sleep timers — set both

A laptop keeps one sleep timeout for when it's on battery and another for when it's plugged in. On Windows 11, under Screen and sleep (newer builds: Screen, sleep, & hibernate timeouts), Microsoft's support page lists them as On battery, make my device sleep after and When plugged in, make my device sleep after. On Windows 10, under Sleep, they're On battery power, PC goes to sleep after and When plugged in, PC goes to sleep after. The exact wording shifts a little between builds.

The classic slip: you change the plugged-in value at your desk, unplug, and the laptop is still running on the old battery value. On battery, nothing is recharging the laptop, so a shorter timeout there usually pays off. Plugged in, you can afford to be more relaxed. From a command line, powercfg /change standby-timeout-dc 10 sets battery and powercfg /change standby-timeout-ac 30 sets plugged in (both in minutes).

Closing the lid is a separate setting, not part of the sleep timer. If your laptop sleeps or blanks the screen when you shut it with an external monitor attached, see why the lid setting often seems ignored.

Want it off in 30 minutes? Shutdown has a countdown, with one catch

Shut down in N minutes (built-in command)

In Command Prompt, run shutdown /s /t 1800. /s shuts the PC down, and /t is the delay in seconds — 30 minutes is 1800, one hour is 3600. Microsoft documents /t as 0 to 315360000 seconds (10 years), with a default of 30 if you leave it out.

To cancel, open a new Command Prompt window and run shutdown /a before the time runs out. Microsoft's documentation says it has to be run as a separate command during the timeout period.

The catch: according to the same documentation, a /t above 0 implies /f, which closes running apps without warning. Anything unsaved is gone.

Best for: "Turn the PC off an hour from now" when you're heading to bed or leaving. Limit: It shuts down rather than sleeps, it closes apps without asking, and it fires at the set time whether or not your job has finished.

Want it asleep in 30 minutes? Windows has no command for that

There's no built-in way to say "go to sleep in 30 minutes, whatever I'm doing." Microsoft's shutdown documentation lists what the command can do: sign out, shut down, restart, hibernate. Sleep isn't one of the options.

shutdown /h is documented only as putting the computer into hibernation, if hibernation is enabled. The documentation doesn't say it works with /t, so don't count on shutdown /h /t 1800 as a delayed hibernate.

The closest built-in thing is the idle sleep timeout ("Make my device sleep after"). Shorten it and walk away — it counts from your last keystroke, not from now, and anything keeping the PC busy resets it.

What you may really want: sleep that follows your day

Schedule sleep behavior by time — PowerDoze (free)

Most people who want a "sleep timer" really want their PC to sleep reliably on a schedule — quiet and power-saving overnight, always awake during work. PowerDoze does exactly that: build a power mode with a short sleep timeout and another that never sleeps, then attach time-based rules (schedules can cross midnight). It switches automatically, and the sleep timeout is bundled with CPU limits, cooling, and screen-off — not just one setting. Free for up to 3 rules and 2 power modes, no account required.

Honest note: PowerDoze schedules and automates Windows sleep — it isn't a one-tap "sleep in X minutes" countdown, and Windows has no built-in one either (see "Want it asleep in 30 minutes? Windows has no command for that"). Limit: The free tier caps at 3 rules; Pro removes it and adds app- and Wi-Fi-based switching.

Download PowerDoze free See time-based scheduling →

Frequently asked questions

Does Windows have a built-in sleep timer?

Not a true countdown timer — only an idle-based "sleep after X minutes" under Settings → Power & battery (Power & sleep on Windows 10). It waits for the PC to be inactive, then sleeps; there's no native "sleep in 30 minutes no matter what" option. A countdown does exist for shutting down (shutdown /s /t), but not for sleeping.

Why won't my PC sleep even though I set a sleep time?

The setting is idle-based, so a download, a playing video, a remote session, or an app holding a wake lock resets the timer. It only sleeps after it's genuinely been idle for the full timeout. See our won't-sleep diagnosis guide.

How do I change how long before Windows sleeps?

Settings → System → Power & battery (or Power & sleep on Windows 10). On Windows 11: Screen and sleep (newer builds: Screen, sleep, & hibernate timeouts) → Make my device sleep after. On Windows 10: When plugged in, PC goes to sleep after. Or run powercfg /change standby-timeout-ac 30 (minutes, plugged in) / standby-timeout-dc (battery).

How do I make my PC shut down in 30 minutes?

Run shutdown /s /t 1800 in Command Prompt. The time is in seconds, so 1800 is 30 minutes. To cancel, run shutdown /a in a new Command Prompt window before the time runs out. Microsoft's documentation says a /t above 0 implies /f, so running apps are closed without warning and unsaved work is lost.

Can I make my PC sleep in 30 minutes?

Not with a built-in command. Microsoft's shutdown documentation covers signing out, shutting down, restarting and hibernating, but not sleep, and it doesn't say that hibernate (/h) works with the /t delay. The closest built-in option is a shorter idle sleep timeout. To make the PC sleep at certain times of day, PowerDoze can switch between a short-timeout mode and a never-sleep mode on a schedule.

How do I set a sleep timer on a laptop?

A laptop has two sleep timeouts: one for battery and one for plugged in. Open Settings → System → Power & battery (Power & sleep on Windows 10) and set both. From a command line, powercfg /change standby-timeout-dc 10 sets battery and powercfg /change standby-timeout-ac 30 sets plugged in (minutes).

Can I make Windows sleep at night but never during work hours?

Windows can't schedule this by time, but PowerDoze can: one power mode with a short sleep timeout, one that never sleeps, and time-based rules that switch between them automatically. Free for up to 3 rules.

Is scheduling sleep with PowerDoze free?

Yes — time-based rules and up to 2 custom power modes are free, no account required, on Windows 10 and 11. Pro removes the 3-rule cap and adds app- and Wi-Fi-based switching.

Want your PC to sleep on a schedule instead of fighting the idle timer? Time-based rules are free — up to 3 rules and 2 power modes, no account required.

Get PowerDoze from the Microsoft StoreGet PowerDoze from the Microsoft Store

See also: Fast Startup vs. Restart, sleep and hibernate · Change Windows sleep time · Why Windows won't sleep · PC waking itself up? Wake timers explained · Schedule power plans by time · All features