can my PC auto-turn off after a few hours?

  • Thread starter Thread starter earworm
  • Start date Start date
E

earworm

New member
ok, simple question,
is it possible? if yes, how.. :)

i love listening to music when i fall asleep, i got a rotten hifi
so sometimes i just play calm music on my pc, running trough one of my compressors and reverb so it sounds nice and smooth,
but sometimes i wake up in the middle of the night because of the 'soft' zooming of the pc, but at night even a soft sound becomes loud, especially when the music stops after an hour or so...

so is there a sleep function, but with a timer so i can say:

turn off after 70 minutes or so?

cheers,
earworm
 
In your control panel, you should be able to adjust your power settings so the computer sleeps after a specified period of time.
 
You did not identify your OS, so this may not work. You need to have the command SHUTDOWN.EXE on your computer.

Copy the following code to a directory in your path. To determine your path type...


Here is the code

@echo off
if x%1 == x goto exit
shutdown -s -f -t %1
goto end
:exit
echo You did not specify how many seconds
echo you want to elapse before the system
echo turns off.
:end
echo on

You execute this from the command line, though you can create a shortcut on the desktop with a predetermined time value if you wish.

To use your new toy just enter at a command prompt SLEEP nnn where nnn is the number of seconds that you want to pass before your computer shuts off. For example, SLEEP 9000 will shutdown your PC after two and a half hours.

Here is the help text for the SHUTDOWN.EXE command

Usage: shutdown [-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 warning
-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 less than 256)
yy is the minor reason code (positive integer less than 65536)


Have fun.
 
In windows XP:

open up command prompt and type:
shutdown -s -t <time delay in seconds>

In Unix, linux etc:

open up a console and type:
shutdown -h <time delay in minutes>
You might have to be logged in as root or su'd to do this depending on security settings.

Both systems have a lot of options. wheelema's given you the Windows options, type 'man shutdown' in a console to get the linux options.
 
ok
i got windows 2000 and will always refuse to use XP :p

i'm gonna see if i can get any of this to work,

thanks already for the info !!
 
Back
Top