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 08 2005,16:44 QUOTE

I edited my crontab and installed cron, I'll be back in a min to see of it works...
Back to top
Profile PM 
arew264 Offline





Group: Members
Posts: 51
Joined: April 2005
Posted: May 09 2005,01:51 QUOTE

hmmmm. I'm lost. at about 8:40 by my clock on May 8, I set up crontab as follows:

45 20 * * * sudo shutdown -n -h -t secs now

Wouldn't this have turned the computer off at 8:45? The shutdown command doesn't work alone, so I made it skip init (very fast) halt linux, and do it instantly. Why did this now work?

For your reference, I downloaded this debian package for the cron server:

cron_3.0pl1-87_i386.deb

which I got from here
Did I get the wrong package or program crontab wrong?
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: May 09 2005,03:16 QUOTE

the shutdown command requires arguments, at the very least whether you want to halt or reboot the system.  For halt you need to specify when, such as "sudo shutdown -h now".
DSL has an alias for this: "sudo halt"


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
skaos Offline





Group: Members
Posts: 430
Joined: April 2004
Posted: May 09 2005,11:20 QUOTE

Normally you have to use the full path of the commands in cron jobs:
45 20 * * * /full/path/to/sudo /full/path/to/shutdown -n -h -t secs now
Back to top
Profile PM 
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