The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Automated shtudown
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Automated shtudown
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
4
(
permalink
)
05-29-2007
porter
Registered User
Join Date: Jan 2007
Posts: 2,965
First you want a shell script which wraps up the shutdown...
First
mkdir /root
put the following in /root/shutdown.sh
Code:
#!/bin/sh echo trying to shutdown at `date`>>/root/shutdown.log shutdown -h now >>/root/shutdown.log
then chmod +x /root/shutdown.sh
get the current crontab
crontab -l >crontab
edit crontab and add
when-to-do-it-according-to-crontab /root/shutdown.sh
finally
crontab crontab
then check with
crontab -l
porter
View Public Profile
Find all posts by porter
Find porter's past nominations received
Find porter's present nominations given