Doh! I made a quick correction to the script... --Wes
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Wesley Mason Sent: Thursday, February 06, 2003 12:15 AM To: [EMAIL PROTECTED] Subject: JPluckc Command line options and Cron Script Hey, I just made a script to run from cron to process any jxl file I specify. I have tested it on my linux box and all looks good. If you use it, you'll have to adjust the options in it to your systems settings. Feel free to use/customize as you need to It assumes you have a jpluck dir in your home directoy and all your jxl files are in it. I'd like to know what the status codes are that jpluckc gives to make the script more intellegent on error. --Wes --- Script --- #!/bin/bash # ## # jpluck-cron # # Usage: jpluck-cron {job} [{device}] # # This will run jpluckc with the {job} (your jxl file without the .jxl) # and e-mail you the log in case of failure. # # This script should work with both bash or ksh (depending on your unix) # # env . /etc/profile if [[ -e ~/.profile ]]; then . ~/.profile fi # Set to your e-mail address MAIL="[EMAIL PROTECTED]" # Set to your default device DEFDEVICE=prism256 JHOME=$HOME/jpluck LOGHOME=$HOME/jpluck MAINLOG=jpluck.log JOB=$1 if [[ "x$2" == "x" ]]; then DEVICE=$DEFDEVICE else DEVICE=$2 fi echo "---------------------------------" >>$JHOME/$MAINLOG echo `date` >>$JHOME/$MAINLOG echo "Starting Job: $JOB" >>$JHOME/$MAINLOG echo "Device: $DEVICE" >>$JHOME/$MAINLOG echo "---------------------------------" >>$JHOME/$MAINLOG /usr/java/jpluck/bin/jpluckc -logfile $LOGHOME/$JOB.log -device $DEVICE $JHOME/$JOB.jxl >>$JHOME/$MAINLOG 2>&1 ST=$? if [[ $ST -gt 0 ]]; then /bin/mail -s "JPluck: $JOB Status: $ST" $MAIL <$LOGHOME/$JOB.log >> $LOGHOME/$JOB.log 2>&1 fi echo "=================================" >>$JHOME/$MAINLOG echo `date` >>$JHOME/$MAINLOG echo "Finished Job: $JOB" >>$JHOME/$MAINLOG echo "Status: $SH" >>$JHOME/$MAINLOG echo "=================================" >>$JHOME/$MAINLOG _______________________________________________ plucker-list mailing list [EMAIL PROTECTED] http://lists.rubberchicken.org/mailman/listinfo/plucker-list _______________________________________________ plucker-list mailing list [EMAIL PROTECTED] http://lists.rubberchicken.org/mailman/listinfo/plucker-list

