LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 03-05-2007, 08:16 AM   #1
Mow
Member
 
Registered: Jul 2003
Posts: 64

Rep: Reputation: 15
schedule a shutdown


I have a Debian server that I want to shutdown on a schedule for maintenance reasons but am scratching my head on it. I was attempting to use the /sbin/halt command but that can only be run as root (right?) .. anyone have any good ideas on this?

Thanks.
 
Old 03-05-2007, 08:21 AM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,993
Blog Entries: 5

Rep: Reputation: 782Reputation: 782Reputation: 782Reputation: 782Reputation: 782Reputation: 782Reputation: 782
schedule = cron (or at).

You can tell it to start the shutdown (man shutdown) in cron (man cron). If it's in root's crontab (man crontab) it will run it as root.

Make sure you specify a warning message at the command line so it doesn't ask you if you want to send your own message as that prompt would prevent the shutdown from proceeding until answered.
 
Old 03-05-2007, 08:29 AM   #3
Mow
Member
 
Registered: Jul 2003
Posts: 64

Original Poster
Rep: Reputation: 15
perfect thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Schedule padideh Linux - Server 4 10-22-2006 08:15 AM
Schedule a task ! L1nuxbug Linux - Networking 4 03-02-2005 07:54 PM
crontab schedule help onlykims Linux - Newbie 2 08-28-2004 12:09 PM
Schedule, AGAIN!! erathomor Linux - General 0 04-11-2002 11:25 AM
HOW TO Schedule erathomor Linux - General 3 04-10-2002 01:57 PM


All times are GMT -5. The time now is 01:01 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration