Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Scheduled Power off/Power on, Restart possible?

Featured Replies

In QNAP and Thecus NASes I can set-up a schedule to power off and power on the NAS at certain times. Is this at all possible in Unraid? I can probably set a cron job to call the powerdown script but power up will be impossible then. So it should be putting the server to sleep and waking up then?

In QNAP and Thecus NASes I can set-up a schedule to power off and power on the NAS at certain times. Is this at all possible in Unraid? I can probably set a cron job to call the powerdown script but power up will be impossible then. So it should be putting the server to sleep and waking up then?

It depends on your BIOS.

 

Some BIOS have the ability turn on at a certain time, others do not.  It entirely depends on your motherboard.

 

As you said, you can set up a cron task to stop the array and power down.

 

Joe L.

  • Author

Thanks Joe,

 

I guess I am out of luck then. I have a Supermicro X9SCM-F. I haven't seen that option in the BIOS. Not even S3.

Most bioses have an option for  "resume on powerloss". Whenever power is gone you can choose between "on / off / last state".

 

If you put that on "on" and setup a cheap power/timer clock between pc and wall socket you can get what you want :

 

01:00 shut down array and power down system

 

01:30 cut power using the timer

 

06:00 restore power using timer

 

On restore of power system will turn on abd boot into unraid.

 

What is my major issue with this is that I allmost always have to do manual stuff to get the system to shudown without a parity check on restart.

  • Author

Most bioses have an option for  "resume on powerloss". Whenever power is gone you can choose between "on / off / last state".

 

If you put that on "on" and setup a cheap power/timer clock between pc and wall socket you can get what you want :

 

01:00 shut down array and power down system

 

01:30 cut power using the timer

 

06:00 restore power using timer

 

On restore of power system will turn on abd boot into unraid.

 

What is my major issue with this is that I allmost always have to do manual stuff to get the system to shudown without a parity check on restart.

 

 

Will this work on the X9SCM-F with BIOS 2.0a too?  Would be nice if this could be done with a UPS.

Most bioses have an option for  "resume on powerloss". Whenever power is gone you can choose between "on / off / last state".

If you put that on "on" and setup a cheap power/timer clock between pc and wall socket you can get what you want :

01:00 shut down array and power down system

01:30 cut power using the timer

06:00 restore power using timer

On restore of power system will turn on abd boot into unraid.

What is my major issue with this is that I allmost always have to do manual stuff to get the system to shudown without a parity check on restart.

You can't just cut the power on the unraid server, i assume you're using a UPS in this scenario, which will do a clean powerdown when you cut power. Besides the fact that you are abusing the UPS this way, there is a bigger risk. Normally, in case of a power loss, you not only want to powerdown the unraid server in a clean way ASAP, but after that is done, also shutdown the UPS. If you don't, in case the power returns for like a minute or a few seconds and powers down AGAIN, you will be in the middel of starting up your unraid server again (because your using 'resume on powerloss') and you can't do a nice powerdown since the UPS probably is empty or near empty... this is why you do NOT want to resume on powerloss. Just stay off.

 

So, do not use the UPS as a handy on/off switch... it's an emergency device, treat it as such.

Most bioses have an option for  "resume on powerloss". Whenever power is gone you can choose between "on / off / last state".

If you put that on "on" and setup a cheap power/timer clock between pc and wall socket you can get what you want :

01:00 shut down array and power down system

01:30 cut power using the timer

06:00 restore power using timer

On restore of power system will turn on abd boot into unraid.

What is my major issue with this is that I allmost always have to do manual stuff to get the system to shudown without a parity check on restart.

You can't just cut the power on the unraid server, i assume you're using a UPS in this scenario, which will do a clean powerdown when you cut power. Besides the fact that you are abusing the UPS this way, there is a bigger risk. Normally, in case of a power loss, you not only want to powerdown the unraid server in a clean way ASAP, but after that is done, also shutdown the UPS. If you don't, in case the power returns for like a minute or a few seconds and powers down AGAIN, you will be in the middel of starting up your unraid server again (because your using 'resume on powerloss') and you can't do a nice powerdown since the UPS probably is empty or near empty... this is why you do NOT want to resume on powerloss. Just stay off.

 

So, do not use the UPS as a handy on/off switch... it's an emergency device, treat it as such.

 

While I fully agree with what you said regarding a UPS, that is not what was being recommended. Nowhere in the original post was UPS mentioned, but it should have been. The timer use case would be directly on the server power cord, on the OUTPUT of the UPS, not the wall side of the UPS. I agree that a UPS should always be used with a server, and the original suggestion should have made clear which SIDE of the UPS the timer should be controlling. With a properly sized and controlled UPS, resume on powerloss can be applied with minimal risk.

If you were using a physical timer/clock I would put it BETWEEN the wall outlet and the UPS.

Then, set up unRAID to cleanly stop itself when power is lost while powered by the UPS  (set it to power down after 15 seconds or so)  Set it to power down the UPS too, so its batteries are not exhausted.

 

Then, when timer is set to provide power back to the UPS, it will power up the server. 

 

That will work as long as you are able to cleanly stop all processes using the disks when powering down.

 

Joe L.

I have been wondering how to do this with my server (I am currently building it so havent actually tried my method yet, but in theorie it should work)

 

Thought I would share, perhaps it can help you.

 

My router supports the dd-wrt custom firmware, I am planning to flash it to this.

 

What I will do that is setup a WOL daemon on the router that will wake up my server every day at a specific time. (http://www.dd-wrt.com/wiki/index.php/WOL)

And run a cron job on the server itself to switch off at a certain time everyday

  • 11 years later...
On 9/23/2012 at 2:24 PM, Joe L. said:

Some BIOS have the ability turn on at a certain time,

Is that uncommon?  I am wondering if it is worth it to hook up a monitor and keyboard to my unraid and look into this.  Right now, I am guessing my odds are low.  

 

I got a run-of-the-mill board:

ASUSTeK COMPUTER INC. PRIME Q270M-C , Version Rev X.0x
American Megatrends Inc., Version 1607,  BIOS dated: Mon 21 Oct 2019

RTC real time clock wakeup can set by command, so you just need enable RTC wakeup in BIOS, then wake up on program time.

Edited by Vr2Io

9 hours ago, xrqp said:

Is that uncommon?

 

In my experience waking at a specified time is almost universal.    What is less common is Wake-on-LAN.

 

I personally make use of that in conjunction with the Parity Check Tuning plugin option to restart array operations (from previous point reached) to allow me to automatically power my system off every night without it causing me issues.

  • 2 weeks later...

How can you shutdown Unraid automatically based on time? 

What is a chron job?  I am unable to write code etc.  

Powering off / restarting on a schedule is easy with the User Scripts plugin

 

Powerdown:

powerdown

 

Restart

powerdown -r

 

As mentioned turning on after a powerdown is dependent upon your BIOS and you have to investigate within it.

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.