Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-12-2004, 09:16 AM   #1
Registered: Jun 2004
Posts: 39

Rep: Reputation: 15
simple timed shutdown script

Hey everyone,

I've been playing around with the bash shell scripts, creating simple backup ones and stuff but I'm looking for a automated shutdown one. I listen to music on my computer during the night at my place and well I usually fall asleep before I can turn it off, and it makes alot of damn noise during the night and wakes me up so well, I want to make a script that tells the computer to just shutdown at a certain time (say round midnight), I'm sure it's possible. Any help would be great
Old 07-12-2004, 09:22 AM   #2
LQ Veteran
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392Reputation: 2392
Take a look at the following:

crontab / cron -> execute scheduled commands.
at -> queue jobs for later execution.

The biggest difference between the two: Cron is for executing commands regularly at the same time. And at is for executing commands once at a certain time.

Hope this helps.
Old 07-12-2004, 05:24 PM   #3
LQ Newbie
Registered: Jun 2004
Location: Iowa
Distribution: Suse 9.0, Fedora Core 2
Posts: 18

Rep: Reputation: 0
Couldn't you just do a shutdown command? Like if you were going to bed at 10 you could put in

shutdown -h +120m

to shut it down at midnight.

Jason Z.
Old 07-12-2004, 06:08 PM   #4
Senior Member
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
shutdown -h 00:00
Old 07-17-2004, 10:19 PM   #5
Registered: Jun 2004
Posts: 39

Original Poster
Rep: Reputation: 15
Yeh, I didn't know you could use the shutdown command to control the whole thing Thanks for everyones help.


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
Iptables (with masq) troubleshooting, very simple script attached script and logs. xinu Linux - Networking 13 11-01-2007 05:19 AM
shutdown script acidjuice Slackware 3 04-09-2005 06:19 PM
Timed Script rridler Programming 10 07-01-2004 11:52 PM
KPPP modem script timed-out kulangotx Linux - Software 2 02-07-2004 08:23 AM
Simple C Shell script is not so simple elconde Programming 2 09-17-2001 12:53 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:37 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration