LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:15 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration