shutdown as a scheduled task

R

Ryan O'Shea

is it possible to have the computer shut down as a
scheduled task? i'm just trying to use it like a radio at
night that will shut itself down within an hour, even if
i'm asleep.
 
B

bob

Hello,
The answer is yes. If you have XP there is a built-in
utility called shutdown.exe. It is located in the
C:/windows/system32/shutdown.exe. (C being the drive XP
in installed on and windows being the directory windows
is in). There are two ways to schedule it. The first is
putting "%windir%/system32/shutdown.exe -s" without the
quotes in scheduled tasks. The -s is for shutdown, you
are able to do other things like restart by putting -r.
These are the commands,
Usage: shutdown.exe [-i | -l | -s | -r | -a] [-f] [-m
\\computername] [-t xx] [-
c "comment"] [-d up:xx:yy]

No args Display this message
(same as -?)
-i Display GUI interface,
must be the first option
-l Log off (cannot be used
with -m option)
-s Shutdown the computer
-r Shutdown and restart the
computer
-a Abort a system shutdown
-m \\computername Remote computer to
shutdown/restart/abort
-t xx Set timeout for shutdown
to xx seconds
-c "comment" Shutdown comment (maximum
of 127 characters)
-f Forces running
applications to close without war
ning
-d [p]:xx:yy The reason code for the
shutdown
u is the user code
p is a planned shutdown
code
xx is the major reason
code (positive integer le
ss than 256)
yy is the minor reason
code (positive integer le
ss than 65536)

The other way would be going to start>run and putting
shutdown.exe -s -t xx. The xx would be the seconds, for
example for 1 hour it would be 3600. If you don't have
shutdown.exe these commands may not be the same for it.
Also, if you download the utility and you go to run
you'll need to put the full location of the shutdown.exe.
If you have any questions feel free to ask.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top