?
Solved

Autoshutdown

Posted on 2004-03-30
6
Medium Priority
?
260 Views
Last Modified: 2010-04-20
At my office, my server will be on by me at 9am and will be close at 7pm...my server also act as a router..

there will be me only who know how to turn on and off the server...so I worried if one of the staff will shutdown my server by pressing off button and not the proper way by typing "halt"

is there any other way for me to set my Redhat9 automaticcaly shutdown completedly at 7pm? or second option is if i can set the server to be running on the spesific time perday, example the server will be down after 10 hour from the online time...

thanks
0
Comment
Question by:learner79
6 Comments
 
LVL 18

Expert Comment

by:liddler
ID: 10712163
You can use cron to shut the system down at 7pm
add the following to root's crontab
0 19 * * * /sbin/halt
0
 

Author Comment

by:learner79
ID: 10712186
i will try it
0
 

Author Comment

by:learner79
ID: 10712189
is there any command line for me to do this? just asking
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 18

Expert Comment

by:liddler
ID: 10712300
crontab -e
(edit the cron table)
man crontab
if you need any help ;-)
0
 
LVL 17

Expert Comment

by:owensleftfoot
ID: 10712347
You could also use at. Type at 19:00 and press return. You will get a prompt like at>
Type /sbin/halt press enter and then press ctrl + d
0
 
LVL 9

Accepted Solution

by:
Alf666 earned 150 total points
ID: 10712362
If your server is recent enough and has ACPI installed, you can also have it react to the power off button properly :

In /etc/acpi/events/power :

       event=button power.*
       action=/sbin/shutdown -h now

You can also look inside your bios. It might have an "auto poweron at a given time" feature.

BTW, I strongly advise against using halt in the above cron job !! halt is a bit harsh for your system and does not go through all
the daemons stop files.
shutdown does a much cleaner job.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month15 days, 10 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question