It can be handy to know how to schedule a shutdown in Windows 7 sometimes. If you know you’re leaving the house in a few, but you want to finish that download or your latest fraps video render, then you can schedule a shutdown via the built-in task scheduler that is really very easy to use.
First of all, open up the task scheduler of Windows 7.
1. StepClick on start and enter “task scheduler” into the search field, alternatively enter taskschd.msc or click on “Programs/Accessories/System Tools/Task Scheduler.
2. Step Let’s create a basic task, simply click on “Create basic task”:
3. Step Enter a task name e.g. Shutdown
4. Step Define a trigger time, e.g. midnight.
5. Step If you want to shutdown your PC daily at the same time, select daily.
6. Step Select a date range. Next, select “Start a program”:
7. Step Here’s the actual shutdown process. Type it in exactly as seen on the image:
How to schedule reboot, hibernation, log off
- To schedule a reboot replace -s with -r
- To schedule hibernation replace -s with -h
- To schedule log off replace -s with -l
There are some options that you can use to specify how Windows 7 is supposed to shutdown, forced shutdown, wait time, etc.
- -l Log off
- -s Shutdown the computer.
- -r Shutdown and restart the computer.
- -p Turn off the local computer with no time-out or warning. Can be used with /d and /f options.
- -h Hibernate
- -t xxx If you want a timeout time before it shuts down the PC. xxx = time in seconds
- -c “comment” If you want to comment on the shutdown process.
- -f Force shutdown and terminate all open applications
How to modify scheduled task
If you want to modify or delete your scheduled shutdown task, open up the task scheduler and click on “task scheduler library” in the left sidebar. The task will be listed there as whatever you called the task in step (3).
Keep in mind that all open windows will be closed down and you might lose data that hasn’t been saved. So, make sure that you save everything before scheduling a shutdown task in Windows 7.
tried the hibernation method ONLY which did NOT work on windows 7 ultimate x64.
I’ll look into it Dirol, don’t know why it would not work. Try to create a shortcut with the command shutdown -h and see if that works..
I tried using “-h -t1” and when the task is on time to be excuted, a cmd window opens and closes quickly so i don’t know what is written in there as well as i’m not sure if it is my computer only getting this.
but when i tried “-h” only, it worked. Besides, you mentioned creating a shortcut, what do you mean exactly?
I’m also interested to know how to kill/End a process in that please.
You can create a shortcut to shutdown your computer. Read this tutorial:
Shortcut to desktop
I know your problem know. You wrote:
-h -t1
To schedule the shutdown with a timeout it needs to be:
-h -t 1
There is a space between the t and the number.
If you want to schedule a “process killing”. Try to schedule this command:
taskkill /IM process.exe
or if you know the PID (process id) you can run:
taskkill /PID number
You might want to read this article about the powershell, which
you can use to do some really cool stuff:
Windows 7 Powershell
Aooo… Sorry :S. No the “-h -t 1” with space didn’t work. (sorry for writing it wrongly in my previous post).
Ok: thanks for the info of the “Process Killing” :)
Usually under Windows environment, options are preceded by the slash character and not the dash like under Linux environment. So it should be: shutdown /h /t 1
Is it also possible to instead of the -h for hibernate use any other -flag for putting the pc to rest to standby ?