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

NAME
ikvm - java virtual machine executable using the CLI runtime SYNOPOSIS
ikvm [ options ] class [ args ... ] ikvm [ options ] -jar jarfile [ args ... ] DESCRIPTION
IKVM is an implentation of the Java for the Common Language Infrastructure (CLI) runtime. It includes a byte code JIT compiler/verifier to translate Java byte code to CIL and GNU Classpath to provide the Java class libraries. ikvm program performs this translation and execu- tion at run time, the ikvmc(1) program provides a static compilation to CIL. This program is intended to act as a drop-in replacement for the java program that executes java bytecode (with or without a JIT) and as such, takes a subset of that tool's options and arguments as given here. ikvm operates in two modes, either on a fully-qualified Java classname or on a jar file with the -jar jarfile option given. Any remaining arguments args ... are passed to the main class. CLASS SEARCHING
Classes are searched for in the current directory if no -cp / -classpath option, no -jar option and no CLASSPATH environment variable is set. If only CLASSPATH is set and no ptions are given only that is used to find classes, the current directory is not used unless CLSSPATH con- tains . If -cp / -classpath is given, CLASSPATH is ignored. If -jar is given, the jar file is put at the start of the classpath taken from either the -cp / -classpath option or from CLASSPATH. See also the description for the -Xbootclasspath option below. OPTIONS
-cp path -classpath path Set the JVM classpath to search for application classes and resources. The path is a sequence of directories and zip/jar files sep- arated by : (; on Windows). If this option is given more than once, only the last one applies. -Dname=value Set a system property name to value. -ea[:packagename ... | :classname] -enableassertions[:packagename ... | :classname] Enable assertions. -da[:packagename ... |:classname] -disableassertions[:packagename ... | :classname] Disable assertions. -version Display IKVM and runtime version -Xbootclasspath:path Set the boot JVM classpath for bootstrap classes and resources. The path is a sequence of directories and zip/jar files separated by : (; on Windows). If this option is given more than once, only the last one applies. -Xbreak Trigger a user defined breakpoint at startup -Xmethodtrace:string Builds method trace into the specified output methods -Xsave Save the generated assembly for debugging. -Xtime Time the execution. -Xtrace:name Displays all tracepoints with the given name. -Xwait Keep the process hanging around after exit. -? -help Display a summary of the usage. SEE ALSO
ikvmc(1), ikvmstub(1). IKVM Project web site http://ikvm.net/ <http://ikvm.net/> Man page by Dave Beckett, made available under the same terms as IKVM. 2005-06-19 ikvm(1)
All times are GMT -4. The time now is 07:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy