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
unpack200(1)						      General Commands Manual						      unpack200(1)

NAME
unpack200 - JAR Unpacking tool SYNOPSIS
unpack200 [ OPTIONS ] input-file JAR-file PARAMETERS
The options may be in any order. The last option on the command line supersedes all previously specified options. For a discussion of the options, see OPTIONS below. input-file name of the input file, which can be a pack200 gzip file or a pack200 file. The input could also be JAR file produced by pack200(1) with an effort of 0. In this case, the contents of the input file will be copied to the output JAR file, with the Pack200 marker. JAR-file name of the output JAR file. DESCRIPTION
The unpack200 tool is a native implementation that transforms a packed file produced by pack200(1) into a JAR file. Typical usage: % unpack200 myarchive.pack.gz myarchive.jar In this example, the myarchive.jar is produced from myarchive.pack.gz using the default unpack200 settings. OPTIONS
-Hvalue --deflate-hint=value Sets the deflation to be true, false, or keep on all entries within a JAR file. The default mode is keep. If true or false, over- rides the default behavior and sets the deflation mode on all entries within the output JAR file. Non-Standard Options -r --remove-pack-file Removes the input packed-file. -v --verbose Outputs minimal messages, multiple specification of this option will output more verbose messages. -q --quiet Specifies quiet operation with no messages. -lfilename --log-file=filename Specifies a log file to output messages. EXIT STATUS
The following exit values are returned: 0 Successful completion. >0 An error occurred. SEE ALSO
pack200(1), jar(1), jarsigner(1), attributes(5) For API specification and other related information: http://java.sun.com/j2se/5.0/docs http://java.sun.com/j2se/5.0/docs/guide/deployment/deployment-guide/pack200.html NOTES
: This command should not be confused with unpack(1). They are distinctly separate products. The J2SE API Specification provided with the JDK release is the superseding authority, in case of discrepancies. 14 July 2004 unpack200(1)
All times are GMT -4. The time now is 07:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy