Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: How do I make DSL shut down at a certain time?, I know it prolly has to do with cron...< Next Oldest | Next Newest >
arew264 Offline





Group: Members
Posts: 51
Joined: April 2005
Posted: May 06 2005,21:39 QUOTE

OK, I have a question. How would I go about setting up DSL to shut down at say... 7:30 PM. My computer clock is set right. I believe I have cron installed from a debian package. I am running apache and a website on an old pentium comp that runs well and does what it should. THis is an older computer that doesn't turn off on it's own because you have to hit the poser button (the power button is really a switch). I'm planning to put a timer on the surge protector so the following will occur:
6:00 AM timer turns on surge protector and computer turns on
7:30 PM computer turns off
7:40 PM timer turns off surge protector to complete the shutdown

I can get a timer, but how do I schedule a shutdown?
Back to top
Profile PM 
Caspar_s Offline





Group: Members
Posts: 105
Joined: Jan. 2005
Posted: May 06 2005,23:13 QUOTE

Google help cron
and linux shutdown.

If dsl has "shutdown" you can put the time in that, but for regular use, cron would be best I think.
Back to top
Profile PM 
arew264
Unregistered






Posted: May 06 2005,23:23 QUOTE

you mean putting a shutdown command in the bootlocal.sh and setting the seconds to the huge number representing the time when it should turn off? that would work...

THanks for your help. Any other ideas appreciated while I play with this.
Back to top
clacker Offline





Group: Members
Posts: 570
Joined: June 2004
Posted: May 07 2005,16:11 QUOTE

EDIT: reread message and revised answer

You need to make a crontab file.  To do this, open a bash shell and type:

export VISUAL=beaver

to use beaver as your crontab editor.  You could use any editor you want.  Now edit a crontab file by typing crontab -e  Here is an example crontab file that shuts down every day at 8:00:

Code Sample

30 19 * * * sudo shutdown

# minute (0-59 or *)    30 = minutute = 30
...# hour (0-23 or *)  19 = 7 PM
......# day (1-31 or *)  * = everyday
........# month (1-12 or *) * = every month
...........# day of week (0-6 6=Sunday) * = every day of the week

view your crontab file using crontab -l
Back to top
Profile PM 
SaidinUnleashed Offline





Group: Members
Posts: 1428
Joined: Mar. 2004
Posted: May 07 2005,17:26 QUOTE

You will also need to install a cron server, because DSL doesn't have one.

Use the search function at packages.debian.org to look at the different available crons and choose one that will suit you.


--------------
They say if you play a Microsoft CD backwards, you hear satanic messages. That's nothing, cause if you play it forwards, it installs Windows.

Unleash the power of the TILDE~~~
Back to top
Profile PM AOL MSN YIM 
8 replies since May 06 2005,21:39 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: How do I make DSL shut down at a certain time?

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code