Sponsored Content
Full Discussion: Retry Logic But In Cron
Top Forums UNIX for Beginners Questions & Answers Retry Logic But In Cron Post 303046099 by xgringo on Thursday 23rd of April 2020 05:31:39 PM
Old 04-23-2020
Retry Logic But In Cron

Hard to explain but we get two sets of files in, and index file and image file. Often the image file arrives way later, so we just run this resubmit.sh script I'm going to show in a second.
Code:
java_dir="/apps/dwd/rip-robinprod/jar"
log_dir="/apps/dwd/logs"
log="$log_dir/resub.`date +"%m%d%y"`.log"
error_dir="/apps/dwd/rip-robinprod/work/"
ERRORFILE=`ls /apps/dwd/rip-robinprod/work/*err|wc -l`
dt=`date '+%d/%m/%Y_%H:%M:%S'`

cd $java_dir
echo $ERRORFILE

if [ $ERRORFILE -gt 0 ]; then
   sed -i 's/�/-/g' $error_dir*.rpt
   echo "The below files have been resbumitted. " >> $log
   echo `ls -ltr $error_dir*err` >>$log
   /bin/java -cp "./TIPError.jar:./TIP31.jar:./TIP31msg_en_US.jar" ResubmitErrors -AuxprpawdRobin01 -P20904 >>$log
else
   echo "No Error Files Found $dt" >>$log ;\
   exit
fi

This basically uses those jar files and tries to reconcile the files, if they don't work the files go back into a directory with the file extensions .err and rpt
Each time they do the resbumit.sh it updates the time stamp. How can we retry like 5 times and then kick out an email that this has been resumitted 5 times please notify vendor?
 

2 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Retry upon FTP failure

I am using the following code in a C Shell script to transfer files to a remote server: ftp -n logxx.xxxx.xxx.xxx.com <<DO_FTP1 quote user $user_name quote pass $password ascii put $js_file_name bin put $FinalZipFile quit DO_FTP1 This code works great except on those rare occasions... (8 Replies)
Discussion started by: phudgens
8 Replies

2. Shell Programming and Scripting

If then else - Retry operation

I need to read a file line by line, then depending on the contents of each line, type in a code that will get written to an array. The problem I have is when I ask the user to confirm the input code, if it is wrong, how do i Return to ask again? Any thing I try increments the file to the next... (6 Replies)
Discussion started by: kcpoole
6 Replies
package-appclient(1M)					    Application Server Utility					     package-appclient(1M)

NAME
package-appclient - packs the application client container libraries and jar files SYNOPSIS
package-appclient Use the package-appclient command to pack the application client container libraries and jar files into an appclient.jar file. The created file is located at appserver_install_dir/lib/appclient/appclient.jar. The appclient.jar file provides an application client container package targeted at remote hosts that do not contain a server installation. The appclient.jar archive contains native code and can be used on a target machine that is of similar architecture as the machine where it was produced. So, for example, an appclient.jar produced on a Solaris SPARC platform cannot be used on a Windows client machine. After copying the appclient.jar file to a remote location, unjar it to get a set of libraries and jar files in the appclient directory After unjarring on the client machine, modify appclient_install_dir/config/asenv.conf (asenv.bat for Windows) as follows: o set AS_WEBSERVICES_LIB to appclient_install_dir/lib o set AS_NSS to appclient_install_dir/lib (appclient_install_dirin for Windows) o set AS_IMQ_LIB to appclient_install_dir/imq/lib o set AS_INSTALL to appclient_install_dir o set AS_JAVA to your JDK 1.4 home directory o set AS_ACC_CONFIG to appclient_install_dir/config/sun-acc.xml Modify appclient_install_dir/config/sun-acc.xml as follows: o Ensure the DOCTYPE file references appclient_install_dir/lib/dtds o Ensure that target-server address attribute refrences the server machine. o Ensure that target-server port attribute refrences the ORB port on the remote machine. o Ensure that log-service references a log file; if the user wants to put log messages to a log file. Modify appclient_install_dir/bin/appclient (appclient.bat for Windows) as follows: o change token %CONFIG_HOME% to appclient_install_dir/config ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Unstable | +-----------------------------+-----------------------------+ appclient(1M) Sun Java System Application Server March 2004 package-appclient(1M)
All times are GMT -4. The time now is 05:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy