Shutdown timer

Choose OS
Choose action
Choose time

Ready-to-use shutdown commands

Shutdown
Restart
Sleep
Now
shutdown /s /f /t 0
shutdown /r /f /t 0
rundll32.exe powrprof.dll,SetSuspendState Sleep
30 seconds
shutdown /s /f /t 30
shutdown /r /f /t 30
@echo off set /a seconds=30 :loop cls echo The computer will sleep in %seconds% seconds echo Close this window if you want to cancel set /a seconds-=1 if %seconds% leq 0 goto lock ping -n 2 127.0.0.1 >nul goto loop :lock /nobreak rundll32.exe powrprof.dll,SetSuspendState Sleep
5 minutes
shutdown /s /f /t 300
shutdown /r /f /t 300
@echo off set /a seconds=300 :loop cls echo The computer will sleep in %seconds% seconds echo Close this window if you want to cancel set /a seconds-=1 if %seconds% leq 0 goto lock ping -n 2 127.0.0.1 >nul goto loop :lock /nobreak rundll32.exe powrprof.dll,SetSuspendState Sleep
10 minutes
shutdown /s /f /t 600
shutdown /r /f /t 600
@echo off set /a seconds=600 :loop cls echo The computer will sleep in %seconds% seconds echo Close this window if you want to cancel set /a seconds-=1 if %seconds% leq 0 goto lock ping -n 2 127.0.0.1 >nul goto loop :lock /nobreak rundll32.exe powrprof.dll,SetSuspendState Sleep
15 minutes
shutdown /s /f /t 900
shutdown /r /f /t 900
@echo off set /a seconds=900 :loop cls echo The computer will sleep in %seconds% seconds echo Close this window if you want to cancel set /a seconds-=1 if %seconds% leq 0 goto lock ping -n 2 127.0.0.1 >nul goto loop :lock /nobreak rundll32.exe powrprof.dll,SetSuspendState Sleep
20 minutes
shutdown /s /f /t 1200
shutdown /r /f /t 1200
@echo off set /a seconds=1200 :loop cls echo The computer will sleep in %seconds% seconds echo Close this window if you want to cancel set /a seconds-=1 if %seconds% leq 0 goto lock ping -n 2 127.0.0.1 >nul goto loop :lock /nobreak rundll32.exe powrprof.dll,SetSuspendState Sleep
Half an hour
shutdown /s /f /t 1800
shutdown /r /f /t 1800
@echo off set /a seconds=1800 :loop cls echo The computer will sleep in %seconds% seconds echo Close this window if you want to cancel set /a seconds-=1 if %seconds% leq 0 goto lock ping -n 2 127.0.0.1 >nul goto loop :lock /nobreak rundll32.exe powrprof.dll,SetSuspendState Sleep
1 hour
shutdown /s /f /t 3600
shutdown /r /f /t 3600
@echo off set /a seconds=3600 :loop cls echo The computer will sleep in %seconds% seconds echo Close this window if you want to cancel set /a seconds-=1 if %seconds% leq 0 goto lock ping -n 2 127.0.0.1 >nul goto loop :lock /nobreak rundll32.exe powrprof.dll,SetSuspendState Sleep
2 hours
shutdown /s /f /t 7200
shutdown /r /f /t 7200
@echo off set /a seconds=7200 :loop cls echo The computer will sleep in %seconds% seconds echo Close this window if you want to cancel set /a seconds-=1 if %seconds% leq 0 goto lock ping -n 2 127.0.0.1 >nul goto loop :lock /nobreak rundll32.exe powrprof.dll,SetSuspendState Sleep
3 hours
shutdown /s /f /t 10800
shutdown /r /f /t 10800
@echo off set /a seconds=10800 :loop cls echo The computer will sleep in %seconds% seconds echo Close this window if you want to cancel set /a seconds-=1 if %seconds% leq 0 goto lock ping -n 2 127.0.0.1 >nul goto loop :lock /nobreak rundll32.exe powrprof.dll,SetSuspendState Sleep
4 hours
shutdown /s /f /t 14400
shutdown /r /f /t 14400
@echo off set /a seconds=14400 :loop cls echo The computer will sleep in %seconds% seconds echo Close this window if you want to cancel set /a seconds-=1 if %seconds% leq 0 goto lock ping -n 2 127.0.0.1 >nul goto loop :lock /nobreak rundll32.exe powrprof.dll,SetSuspendState Sleep
5 hours
shutdown /s /f /t 18000
shutdown /r /f /t 18000
@echo off set /a seconds=18000 :loop cls echo The computer will sleep in %seconds% seconds echo Close this window if you want to cancel set /a seconds-=1 if %seconds% leq 0 goto lock ping -n 2 127.0.0.1 >nul goto loop :lock /nobreak rundll32.exe powrprof.dll,SetSuspendState Sleep
6 hours
shutdown /s /f /t 21600
shutdown /r /f /t 21600
@echo off set /a seconds=21600 :loop cls echo The computer will sleep in %seconds% seconds echo Close this window if you want to cancel set /a seconds-=1 if %seconds% leq 0 goto lock ping -n 2 127.0.0.1 >nul goto loop :lock /nobreak rundll32.exe powrprof.dll,SetSuspendState Sleep
8 hours
shutdown /s /f /t 28800
shutdown /r /f /t 28800
@echo off set /a seconds=28800 :loop cls echo The computer will sleep in %seconds% seconds echo Close this window if you want to cancel set /a seconds-=1 if %seconds% leq 0 goto lock ping -n 2 127.0.0.1 >nul goto loop :lock /nobreak rundll32.exe powrprof.dll,SetSuspendState Sleep
9 hours
shutdown /s /f /t 32400
shutdown /r /f /t 32400
@echo off set /a seconds=32400 :loop cls echo The computer will sleep in %seconds% seconds echo Close this window if you want to cancel set /a seconds-=1 if %seconds% leq 0 goto lock ping -n 2 127.0.0.1 >nul goto loop :lock /nobreak rundll32.exe powrprof.dll,SetSuspendState Sleep

Easily generate custom commands for scheduling shutdowns, restarts, sleep, hibernation, log-offs, and more for both Windows Vista/7/8/10/11 and MacOS in just seconds.

No coding required—simply choose your desired action, set the timer, and our tool will generate the command for you. You can either copy the command to your clipboard or download it as a .bat (Windows) or .command (MacOS) file for easy execution. Perfect for automating power management with simplicity and precision on both platforms.