Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Shutdown script for cron
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
T0M3K
n00b
n00b


Joined: 19 Mar 2004
Posts: 67
Location: Brooklyn, NY

PostPosted: Sat Jul 03, 2004 8:28 pm    Post subject: Shutdown script for cron Reply with quote

Can somebody write me a simple script that can be used by cron.hourly
I would like it to check the time and if it's between 22 and 9, then it would send shutdown command.
Thanks in advance.
_________________
http://www.dslr.net/
Back to top
View user's profile Send private message
bdoggy
n00b
n00b


Joined: 03 Jul 2004
Posts: 1

PostPosted: Sat Jul 03, 2004 8:47 pm    Post subject: Reply with quote

Try here...
http://www.tldp.org/LDP/abs/html

:)
Back to top
View user's profile Send private message
scout
Veteran
Veteran


Joined: 08 Mar 2003
Posts: 1991
Location: France, Paris en Semaine / Metz le W-E

PostPosted: Sat Jul 03, 2004 8:49 pm    Post subject: Reply with quote

Or you could use the normal cron and no scripts:
in root type "crontab -e"
then add the lines:
0 0-9 * * * halt
0 22-23 * * * halt
_________________
http://petition.eurolinux.org/ - Petition against ePatents
L'essence de la finesse
Back to top
View user's profile Send private message
T0M3K
n00b
n00b


Joined: 19 Mar 2004
Posts: 67
Location: Brooklyn, NY

PostPosted: Sun Jul 04, 2004 9:45 pm    Post subject: thanx Reply with quote

Simple and working. Thanx a lot.
_________________
http://www.dslr.net/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum