?
Solved

Autoshutdown

Posted on 2004-03-30
6
Medium Priority
?
258 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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

649 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