Sign in with
Sign up | Sign in
Your question

Freenas shutdown timer

Last response: in Linux/Free BSD
Share
April 18, 2010 2:35:57 PM

I've just installed freenas on my pc. I've setup scheduled shutdowns but is there a command I could use to get it to shutdown or hibernate after 2-3 hours after i've turned it on.

More about : freenas shutdown timer

April 18, 2010 7:31:23 PM

There's a daemon called cron to execute scheduled commands, so you could "cron" the shutdown command to run at a certain time of day.

For e.g.

0 1 * * * /sbin/shutdown -h 10

This'll shut down the computer at 1 am, according to your computer's clock, giving you 10 minutes of grace time to cancel the shutdown if you're using your computer and you've changed your mind about shutting it down.

Granted this isn't a good idea for everyone, it's up to you if you want to do this or not, some people argue it's best to let the computer run all the time, if it's needed, and use power management instead, unless it's a server 24/7 scenario where you probably don't want any power management at all. Power management itself can create its own problems especially if your motherboard's got buggy ACPI. Some boards have really terrible ACPI power management.

If you've got a gui installed have a look at System->Preferences->PowerManagement or read your distro's manual on power management. If you're not already familiar with system scripts it's best not to mess with the system's internals manually.

Good luck :) 
April 23, 2010 11:29:01 AM

thank you
!