cron-tab entry

From: Clepto (clepto@oemsunix.onysd.wednet.edu)
Date: 05/24/96


im on solaris 2.5 which is SYS V R 4. so im not sure how much use it will
be to you.  I have permission to run a crontab.  at the prompt i type
crontab -e to edit my crontab. im sure you can get your set of commands
from the man pages. try man cron and man crontab.  i have my cron run
every 10 minutes to check if my mud is running. if it is, it does nothing,
if it isnt, it boots it. here is my script and crontab entries:

crontab:
0,10,20,30,40,50 * * * * /home/clepto/bin/cron.tab/we.running


here is my script

we.running:
#!/bin/sh
if /bin/ps -u whatever | /bin/grep "we" > /dev/null
then :
#then
#/bin/id | /bin/mailx ryanpf
#/bin/echo "talker running fine" | /bin/mailx ryanpf
else
cd /home/talkers/whatever/nuts/we/
./we
#/bin/echo "talker rebooted" | /bin/mailx whatever
fi


my crontab does auto-mailing of what ever action it preformed. (ie: reboot
or startup) so i dont have it e-mail me, if yours doesnt, simply uncomment
the the items above and it should email you.  BTW the command - then :
is then null, so it performs no action and doesnt email me.  you can set
it up to run however often you want by changinf the minutes of the hour
section in the crontab 0,10,20,30,40,50 * * * * is every 10 mins and
0,5,10,15,20,25,30,35,40,45,50,55,60 * * * * is every 5 minues.  Please
let me know if this has helped you at all.



Later,
                                                 ()
       King Clepto of WhatEver.                  ||
                                            (==========)
        Defender of the Realm.                   ||
                                                 ||
 ____________________________________________________________________________
/                                                                            \
\/|                                                                        |\/
  |       CCCCCCC   L         EEEEEEE   PPPPPP    TTTTTTT   OOOOOOO        |
  |       C         L         E         P     P      T      O     O        |
  |       C         L         EEE       P     P      T      O     O        |
  |       C         L         EEE       PPPPPP       T      O     O        |
  |       C         L         E         P            T      O     O        |
  |       CCCCCCC   LLLLLLL   EEEEEEE   P            T      OOOOOOO        |
/\|                                                                        |/\
\____________________________________________________________________________/
                                                 ||
   E-mail: clepto@onysd.wednet.edu               ||
 HomePage: http://164.116.34.2/~clepto/          \/
 WhatEver: telnet 164.116.34.2 3000



This archive was generated by hypermail 2b30 : 12/18/00 PST