View the Most Wanted LQ Wiki articles.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


Search this Thread
Old 03-05-2007, 09:16 AM   #1
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?

Old 03-05-2007, 09:21 AM   #2
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,028
Blog Entries: 5

Rep: Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791
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, 09:29 AM   #3
Registered: Jul 2003
Posts: 64

Original Poster
Rep: Reputation: 15
perfect thanks.


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 09:15 AM
Schedule a task ! L1nuxbug Linux - Networking 4 03-02-2005 08:54 PM
crontab schedule help onlykims Linux - Newbie 2 08-28-2004 01:09 PM
Schedule, AGAIN!! erathomor Linux - General 0 04-11-2002 12:25 PM
HOW TO Schedule erathomor Linux - General 3 04-10-2002 02:57 PM

All times are GMT -5. The time now is 12:14 PM.

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