View previous topic :: View next topic |
Author |
Message |
T0M3K n00b
Joined: 19 Mar 2004 Posts: 67 Location: Brooklyn, NY
|
Posted: Sat Jul 03, 2004 8:28 pm Post subject: Shutdown script for cron |
|
|
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 |
|
|
bdoggy n00b
Joined: 03 Jul 2004 Posts: 1
|
|
Back to top |
|
|
scout Veteran
Joined: 08 Mar 2003 Posts: 1991 Location: France, Paris en Semaine / Metz le W-E
|
Posted: Sat Jul 03, 2004 8:49 pm Post subject: |
|
|
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 |
|
|
T0M3K n00b
Joined: 19 Mar 2004 Posts: 67 Location: Brooklyn, NY
|
Posted: Sun Jul 04, 2004 9:45 pm Post subject: thanx |
|
|
Simple and working. Thanx a lot. _________________ http://www.dslr.net/ |
|
Back to top |
|
|
|