Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: Maniac on April 10, 2007, 11:29:45 AM
-
hi everyone!
I couldn't find a solution for this problem, so I'm posting here:
Is it possible to let the server automatically shut down every day at a specific time?
Starting up is no porblem, this is easy to setup by bios.
Is there a plugin or something?
thanks, Maniac
-
Is it possible to let the server automatically shut down every day at a specific time?
You can set up a cron job to do this.
-
Yes, you will need to run the 'shutdown' command in a cron job.
Do a 'man shutdown' to see how to use it.
An alternative is 'signal-event halt' , also run as a cron job.
Are you certain that your bios can wake up at a certain time everyday ?
-
ok thanks, I'll try this..
Yes, I tried it. The function in the bios is called "wake up by date"
-
It took some time today (cause I'm a noob :wink: )but now the Server starts accurately at 10 o'clock and shuts down at 0, friday and saturday at 2.
This will save a lot of energy over time.
my crontab file:
MAILTO=root
HOME=/
0 0 * * 1-4,7 shutdown -h now
0 2 * * 5-6 shutdown -h now
For germans who are interested: http://www.selflinux.org/selflinux/html/cron01.html#d63e59
-
It took some time today (cause I'm a noob :wink: )but now the Server starts accurately at 10 o'clock and shuts down at 0, friday and saturday at 2.
This will save a lot of energy over time.
my crontab file:
MAILTO=root
HOME=/
0 0 * * 1-4,7 shutdown -h now
0 2 * * 5-6 shutdown -h now
For germans who are interested: http://www.selflinux.org/selflinux/html/cron01.html#d63e59
I advice you to use the signal-event halt instead of the shutdown command, as this is a SME Server specific event which might handle other things which are not done with the shutdown command (no wor in the future).
My advice is not to do shutdown/start-up stuff like this as you risk loss of data and corruption of data, this might in the end cost you more than your energy bill.