Help answer threads with 0 replies.
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, 08: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, 08:21 AM   #2
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,945
Blog Entries: 14

Rep: Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163
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
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 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 > Forums > Linux Forums > Linux - Server

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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration