auto shutdown and wake up


Recommended Posts

Hey all,

I would like my server to shut itself down at say, 10pm and then wake itself up at 5pm. Is there a way to do this, without wake on lan? I really want to set it and forget it. I tried searching the faq, but only found a link to the clean powerdown script. I didn't think you could schedule a shut down with that. Thanks for the help.

Link to comment

Hey all,

I would like my server to shut itself down at say, 10pm and then wake itself up at 5pm. Is there a way to do this, without wake on lan? I really want to set it and forget it. I tried searching the faq, but only found a link to the clean powerdown script. I didn't think you could schedule a shut down with that. Thanks for the help.

 

Get a UPS. Put the UPS on a timer.  Shut it down at 10:00PM with the timer.  Have the UPS shut the server down and then turn its output off until power is restored.  Set BIOS to restart your system on power-up.  When you reapply power with the timer at 5PM, everything should restart. 

 

As a note of disclosure, I have never tried this....  8)

Link to comment

I already have a UPS connected, but it also powers my main desktop, so that really wouldn't work.

Gotta ask. Just how big is this UPS, and have you tested to make sure it has enough run time to allow clean shutdown of both machines? Also, how are you automating the shutdown of both machines? I'm assuming one machine running apcupsd is plugged into the status port of the UPS and the other machine is running apcupsd in slave mode?
Link to comment

I already have a UPS connected, but it also powers my main desktop, so that really wouldn't work.

Gotta ask. Just how big is this UPS, and have you tested to make sure it has enough run time to allow clean shutdown of both machines? Also, how are you automating the shutdown of both machines? I'm assuming one machine running apcupsd is plugged into the status port of the UPS and the other machine is running apcupsd in slave mode?

 

It's big enough to run both for awhile. Unfortunately, I only have the software on my main desktop, so the unraid would just take a shit. Which is another reason why I would like to get it to only be on for a few hours per day.

Link to comment

Unless you have scheduled power outages you are just hoping to get lucky. It's more important to shutdown unRAID cleanly than your desktop. Search for APCUPSD.

 

+1 

 

Recent releases of Windows are very good about handling unexpected power outages.  You may lose some data from open applications but the operating system is very robust at handling these issues.  unRAID, on the other hand, seems to have many more problems with crashes resulting from power outages.

Link to comment

I already have a UPS connected, but it also powers my main desktop, so that really wouldn't work.

Gotta ask. Just how big is this UPS, and have you tested to make sure it has enough run time to allow clean shutdown of both machines? Also, how are you automating the shutdown of both machines? I'm assuming one machine running apcupsd is plugged into the status port of the UPS and the other machine is running apcupsd in slave mode?

 

It's big enough to run both for awhile. Unfortunately, I only have the software on my main desktop, so the unraid would just take a shit. Which is another reason why I would like to get it to only be on for a few hours per day.

apcupsd can run on either, and the other listen on the LAN for the power loss.  (Hint, use a cable type of "ether")

 

From the apcupsd.conf file:

# UPSCABLE <cable>

#  Defines the type of cable connecting the UPS to your computer.

#

#  Possible generic choices for <cable> are:

#    simple, smart, ether, usb

#

#  Or a specific cable model number may be used:

#    940-0119A, 940-0127A, 940-0128A, 940-0020B,

#    940-0020C, 940-0023A, 940-0024B, 940-0024C,

#    940-1524C, 940-0024G, 940-0095A, 940-0095B,

#    940-0095C, M-04-02-2000

#

UPSCABLE smart

 

# To get apcupsd to work, in addition to defining the cable

# above, you must also define a UPSTYPE, which corresponds to

# the type of UPS you have (see the Description for more details).

# You must also specify a DEVICE, sometimes referred to as a port.

# For USB UPSes, please leave the DEVICE directive blank. For

# other UPS types, you must specify an appropriate port or address.

#

# UPSTYPE  DEVICE          Description

# apcsmart  /dev/tty**      Newer serial character device,

#                            appropriate for SmartUPS models using

#                            a serial cable (not USB).

#

# usb      <BLANK>          Most new UPSes are USB. A blank DEVICE

#                            setting enables autodetection, which is

#                            the best choice for most installations.

#

# net      hostname:port    Network link to a master apcupsd

#                            through apcupsd's Network Information

#                            Server. This is used if you don't have

#                            a UPS directly connected to your computer.

#

Link to comment
apcupsd can run on either, and the other listen on the LAN for the power loss.

That's assuming the switch is on a UPS as well. If the LAN goes down...

 

I have all the computers in the house listening to one master, with varied shutdown timeouts defined. The master is a super low power mini-itx box with my home automation and communication stuff, it pretty much stays running until there is no battery left, the other machines are set to shut down after only a couple minutes. Around here, power outages are pretty much two flavors, either it comes back on in a few seconds, or it's going to be out for a couple hours.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.