Announcement

Collapse
No announcement yet.

Restart Windows at Specific Time of Day

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Restart Windows at Specific Time of Day

    Quick little application that will restart windows from script command now or at some other time in the day. Runs indepenent of homeseer. When it comes time for a restart all applications will be sent a close message and allowed 15 seconds to save their data. After this windows will be restarted.

    Store RestartWindows.exe anywhere. Run it without a parameter to restart now. Run it with a time of day then it will restart at that time. Can be run from script, homeseer event, or command prompt.

    Should work with Windows NT/W2K/XP/W9x, but only treid with W2K.


    For examples:

    C:\Program Files\Homeseer\RestartWindows.exe "3:30 AM"

    will restart windows the next time it is 3:30 AM which will be today or tomorrow depending upon when it is commanded.


    C:\Program Files\Homeseer\RestartWindows.exe "9:15,30"

    will restart windows at the next 9:15 AM and allow 30 seconds for an application to clean up and shut itself down before forefully being terminated


    C:\Program Files\Homeseer\RestartWindows

    will restart windows now with 15 seconds allowed for each application to shutdown

    PR 1 1.2.0 Add 2nd parameter as number of seconds to allow an application to shutdown
    Attached Files
    Last edited by Michael McSharry; February 15th, 2006, 11:57 AM.

  • #2
    Or you could run it via the Windows scheduler if you are having problems with HS.


    ~Bill

    Comment


    • #3
      MCS:

      PS, thanks for another great add-on app!


      ~Bill

      Comment


      • #4
        Bill,
        This does run independent of Homeseer. I simply moved it from the script library to this forum as this seems to be the current wave on the new message board.

        Comment


        • #5
          Hey Mike,

          I was just referring to the triggering of your app. I was just stating that you can trigger your app without using HS, say maybe in the case that HS locks up over night and you need a fresh run before the morning wake-up routines.

          I had a problem of a lockup overnight some time ago and you would wake up to a dark cold house.

          Later sir!


          ~Bill

          Comment


          • #6
            Restart on Heartbeat

            I'm not using this program but I schedule a reboot every 11 minutes. The heart beat is every 5 minutes at which point it sends a signal to the Ocelot (changes condition of a virtual device). If the Ocelot receives the signal it restarts a timer. When the timer reaches 11 minutes (missed 2 heart beats) a relay on the Secu16 is Closed and reset. This relay is connected to the reset pins on the motherboard causing a reboot of the computer. The program that runs this reboot is programmed in the Ocelot. In the three years that I've run this it has rebooted the computer 2 times, both were in a two day period.

            Comment


            • #7
              Michael, I've been using this program for a while now - it's very useful, however, can a version be made that gives a user-defined time for "When it comes time for a restart all applications will be sent a close message and allowed 15 seconds to save their data. After this windows will be restarted" The driver for my capture card does not like only having 15 seconds to shutdown.. it needs 20-25 seconds. I've already set windows to allow applications and services 25 seconds to shutdown before forcing them to shutdown, but when I use your app, my capture card doesn't always work on reboot.

              So, can a version with either a user-defined (via the command line) "wait" time be made, or can a version with a 25 second wait be made?

              Thanks!
              John
              Hardware: i5-6400T w/16GB RAM & SSD w/HS3Pro, Z-Net, Harmony Hub x2, Echo Dot x2, Ocelot
              Plugins: Z-wave, HSTouch, BLBackup, Harmony, GTS CPUXA, UltraMon3, Nest
              HSTouch: Multiple Android Devices; 5 x ToteVision MD-1001 10.1" Win 7 Tablets
              Devices: Cooper RF9501 x4, RF9517 x6, RF9534 x1, RF9540-N x7, RF9542 x1, RF9542-Z x2, RFHDSCG x1, RFWC5 x5; Intermatic HA02 x6; FortrezZ MIMOLite x3; Leviton VRPD3-1LW x4, VRR15-1LZ x6; Nest Tstat & 9x Protects; Dragon PD-100 x3, PA-100 x3

              Comment


              • #8
                Update made for wait time. Syntax is shown in examples at the top of the thread.

                Comment


                • #9
                  Thanks!

                  would this be the right command for shutdown NOW with 30 second wait?
                  C:\Program Files\Homeseer\RestartWindows.exe "30"
                  or does a time have to be specified first?
                  John
                  Hardware: i5-6400T w/16GB RAM & SSD w/HS3Pro, Z-Net, Harmony Hub x2, Echo Dot x2, Ocelot
                  Plugins: Z-wave, HSTouch, BLBackup, Harmony, GTS CPUXA, UltraMon3, Nest
                  HSTouch: Multiple Android Devices; 5 x ToteVision MD-1001 10.1" Win 7 Tablets
                  Devices: Cooper RF9501 x4, RF9517 x6, RF9534 x1, RF9540-N x7, RF9542 x1, RF9542-Z x2, RFHDSCG x1, RFWC5 x5; Intermatic HA02 x6; FortrezZ MIMOLite x3; Leviton VRPD3-1LW x4, VRR15-1LZ x6; Nest Tstat & 9x Protects; Dragon PD-100 x3, PA-100 x3

                  Comment


                  • #10
                    try creating a batch file "reboot.bat" then create an event that launchs an application (batch File) by voice or time or what ever.

                    i also have HS speak after the reboot event triggers, it rambles on about being afraid of the dark and to please not to leave and on and on...

                    copy the following 2 lines into the batch file . edit the message inside the brackets to display what ever you want in the shutdown countdown window. save the file and your done.


                    shutdown -t 20 -r -f -c "place a custom message inside these quotes."
                    cls


                    if you dont know how to create a batch file its very easy. right click on your desktop and select create new text document. then rename it to reboot.bat for example.

                    to edit a batch file right click on it and select open with note pad or text editor.

                    i keep a copyof all of my batch files that HS uses in the HS scripts directory and all the events in a "computer" category.

                    you can do all kinds of computer maintenance like backing up files and folders, disk checking and defragmenting etc etc.

                    i even have HS turn on remote computers with a batch file.
                    Last edited by Modster; February 24th, 2006, 03:05 PM.

                    Comment


                    • #11
                      any ideas on how to simply shutdown a pc based on hs? I run a few media center pc's and it would be great to shut them down if it's night or the alarm is armed in away mode.

                      thanks

                      Comment

                      Working...
                      X