Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Automated shutdowns

  1. Nov 12, 2005 #1

    Pengwuino

    User Avatar
    Gold Member

    Ok so I wanted to help save energy by having the computers in my house shutdown after 11:59pm on a daily basis. I used the task scheduler and had the shutdown.exe initiate at that time if the computer is idle for over 15 minutes at the time and attempt for the next 60 minutes if its not. Now, I have some questions.

    If say, Microsoft Word is open and theres an unsaved file just sitting there at 11:59, what will happen? Will it shutdown without saving or will it refuse to shutdown (the computer) or what? :)

    Also, a bit off topic but is there a way to remote-wake a computer over a wireless LAN?
     
  2. jcsd
  3. Nov 12, 2005 #2

    -Job-

    User Avatar
    Science Advisor

    I think Word has an auto-save feature which saves the file every so often (you may have to enable this). Other than that i don't know if it will save at shutdown, but this is something you can easily test.
    For remote wake, if your network card has Wake-On-Lan, then you can use some software to turn it on remotely.
    I found this one: http://www.matcode.com/wol.htm
    You'll need the MAC address of the computer you want to turn on. The best way to get it is to go to that computer, go to run, type "cmd", at the command prompt type "ipconfig /all", the MAC address is displayed under physical address. I don't know if every network card comes with WOL by default though, but they seem to go pretty cheap (i saw one for $11) so you may have one. You can easily do this over the internet also (if the PC you want to remote start is not behind a router, or unless the router can forward the so called "magic packets" that are used for WOL).
    Actually, i think that even if you're behind a router it may work, since the program allows you to specify, besides the MAC address, (optionally) an IP address as well.
     
    Last edited: Nov 12, 2005
  4. Nov 12, 2005 #3

    Pengwuino

    User Avatar
    Gold Member

    Someone once told me however that 802.11g cards are not capable of having WOL capabilities put on them...
     
  5. Nov 13, 2005 #4

    -Job-

    User Avatar
    Science Advisor

    An easy way to find out is to right-click on My Computer, then under the "Hardware" tab click "Device Manager", in the snapin that comes up under "Network Adapters" double click on your network card. Finally select the "Advanced" tab, if in the Properties box there is a "Wake on Settings" or somthing like that, then you know you have it. I'm glad to find out that i have it in my Intel PRO/1000 MTW Network Card.
     
  6. Nov 13, 2005 #5

    Pengwuino

    User Avatar
    Gold Member

    Damn this automated shutdownt hing didn't work! The task looked perfect, 11:59 came with at least an hour of idle time before it and..... nothing... nothing happened....
     
  7. Nov 13, 2005 #6

    -Job-

    User Avatar
    Science Advisor

    I found out what's probably causing it to not shutdown. Shutdown.exe only works if you pass it the appropriate parameters (l for logoff, s to shut down and r to restart). You can try double clicking on it and you'll see nothing happens. All you need to do is right-click on the task you've created, then in the window that comes up, under run, make sure you have -r after shutdown.exe, for example:
    C:\WINDOWS\system32\shutdown.exe -r

    I tried this and it works.
     
  8. Nov 13, 2005 #7

    Pengwuino

    User Avatar
    Gold Member

    I want it to shutdown and it doesnt work :( I trid -s and nothing :(
     
  9. Nov 13, 2005 #8

    -Job-

    User Avatar
    Science Advisor

    Try the following, right click on your desktop, select New -> Shortcut. In the location type C:\WINDOWS\system32\shutdown.exe -l
    Once you're finished with the shortcut double click on it and see if you log off.
     
  10. Nov 13, 2005 #9

    Pengwuino

    User Avatar
    Gold Member

    Yah i tried that and it worked... i suppose i can just point the task to that shortcut but i wanted it to be kinda compact and smart and not having ot just gerryrig some sort of solution.
     
  11. Nov 13, 2005 #10

    -Job-

    User Avatar
    Science Advisor

    I don't think pointing the task to the shortcut will work any more than pointing to the program, because when you select the shortcut it actually selects the target program. Did you right-click on your task and added the -s? That worked for me.
     
  12. Nov 13, 2005 #11

    -Job-

    User Avatar
    Science Advisor

    A cool thing, you can have a countdown and a message displayed as well, this only works for shutdown or restart. Use:
    C:\WINDOWS\system32\shutdown.exe -s -t 10 -c "T minus 10 seconds to shutdown"

    Then you can make a shortcut to abort shudown with:
    C:\WINDOWS\system32\shutdown.exe -a

    This way you give the user an option to prevent shutdown. Pretty cool.
     
    Last edited: Nov 13, 2005
  13. Dec 6, 2005 #12
    Is it Best to Leave Desktops Always On/Standby/Hibernate?

    I read with interest Penguino's plans to have his PC shutdown at midnight, but is better or not for the longevity and total functionlity of the PC to always leave it on?

    I used to in earlier years leave my PC on 24/7. In consideration of wearing out parts, HDs, fans, etc. I have since turned off my PC after daily use.

    But, in light of HP desktop "bios" conflict with HP printers and accessories that destroyed my PCs hal.dll file and required a complete reformat and set-up - I ask if placing it in STANDBY or HIBERNATE when NOT in active use permits a longer useful life, and fewer operational problems? Given also how Windows and critical PC bios and other OS files are put under more work during START-UP.

    What is the expert view of power-up/operating today's PCs?
     
  14. Dec 7, 2005 #13
    The annoying thing about Windows is that even if you *ask* it to shut down, it still wont work on occasion :rolleyes:. I've had limited success with the download manager GetRight's auto-shutdown feature.

    There might be some workable freeware auto-shutdown software on the net (just in case if Microsoft standard is not working properly), such as this when I just googled it: http://www.konradp.com/products/auto_shutdown/
     
  15. Dec 7, 2005 #14
    Code (Text):

    Z:\>shutdown /?
    Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "
    omment"] [-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 wa
    ning
            -d [u][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 l
    ss than 256)
                                    yy is the minor reason code (positive integer l
    ss than 65536)

    Z:\>
     
    -r will reboot.

    Just create a .cmd file with the following text:

    @echo off
    shutdown -s -01
    end

    Then create a schedualed task to do it at 23:59

    If your 802.11 INT can handle magic packets then you can Wake on LAN..

    [edit] Thinking about this, I think your right Mr Penguin, I highly doubt you could wake on LAN through a Wireless NIC. I have a hard enough time getting that to work through VLANS[/edit]
     
    Last edited: Dec 7, 2005
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Automated shutdowns
  1. Forced Shutdown (Replies: 4)

  2. Shutdown Technic (Replies: 4)

  3. Home automation (Replies: 2)

Loading...