Sponsored Content
Full Discussion: Retry Logic But In Cron
Top Forums UNIX for Beginners Questions & Answers Retry Logic But In Cron Post 303046127 by RudiC on Friday 24th of April 2020 05:33:59 PM
Old 04-24-2020
Not sure why you should need cron for your task, but this should run under it as well. Make sure it is run by bash! Replace your if construct with
if [ $(ls ${error_dir} | grep -c "\.err$") -eq 0 ]
  then  echo "No Error Files Found $dt" >>$log
  #           exit
  else  while   ((++CNT <= 5))
          do    echo "The below files have been resbumitted. " >> $log
                ls -ltr ${error_dir}*err >>$log
                /bin/java -cp "./TIPError.jar:./TIP31.jar:./TIP31msg_en_US.jar" ResubmitErrors -AuxprpawdRobin01 -P20904 >>$log
                [ $(ls ${error_dir} | grep -c "\.err$") -eq 0 ] && break
                sleep 5
        if (( CNT == 5))
          then  mail "resumitted 5 times please notify vendor"
          else  echo "error corrected after $CNT retries"
        unset CNT

Be aware that you need to check for the error files in every loop. Check the mail stuff and adapt to your system.

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
SQUEAK(1)																 SQUEAK(1)

squeak - Unix Squeak virtual machine launcher SYNOPSIS
squeak squeak [image filename] [project filename] DESCRIPTION
squeak is the virtual machine for the Squeak Smalltalk system. It requires three files to operate correctly: an image file containing a `snapshot' of a live Squeak session, a changes file containing the source code for modified methods in the image, and a copy of (or a link to) a shared system sources file containing the source code for methods that have not been modified since the last major version increment. The image and changes files contain the state of a user's Squeak session, which is persistent between consecutive sessions. Private copies of these files are therefore normally required. The squeak script checks that the local Squeak installation appears sane, and then copies the required files to the current working directory. If squeak encounters no problems, it will finish by running squeak vm to start a Squeak session using the newly copied image and changes files. INVOCATION
squeak accepts an optional image name, and/or an optional project name. If an image name is given on the command line then squeak tries to run that image. Otherwise squeak checks the environment variable SQUEAK_IMAGE and, if it is set, uses its value as the name of the image to run. Otherwise squeak looks for available images in the ~/squeak and /usr/share/squeak directories. Then, squeak shows a dialog with all the available images for the user to choose one of them. If the chosen image is at SQUEAK_IMAGE_DIR (which is by default /usr/share/squeak), it will be copied to ~/squeak. If only one image is available, no dialog will be shown and the script will run that image. The image argument can be followed by a project name. This is the name of a 'document' that should have been saved from a Squeak image. The project name must have the '.pr' extension. The project argument can also be providen without an image name. In that case, squeak will look for an image to run the project following the same criteria explained above. ENVIRONMENT
To know all the environment variables that can affect the squeak image launching, take a look at the Environment section of the squeakvm man page. Appart from those options, these are applied to this script: SQUEAK_IMAGE_DIR is the directory, together with ~/squeak where the launcher looks for Squeak images. (The default value is /usr/share/squeak) SQUEAK_IMAGE is the name of a image file to be run by the script. SQUEAK is the name of an alternative vm (or alternative vm options) to be run by the script. The script launches the vm with these default options: '-mmap 1024M -nomixer' NOTES
This manual page documents version [version] of Unix Squeak. It may not be appropriate for any other version. The image and changes files containing a saved Squeak session are intimately related. They should always be used together, never be sepa- rated, and under no circumstances should an image be run with a changes file that has been used with a different image. Failure to adhere to the above could cause the source code for the methods in the image to become garbled and impossible to retrieve. The Unix Squeak virtual machine fully supports OpenGL in both the X11 and Quartz display drivers. Open Croquet will run just fine with either of these drivers (and many Mac OS X users will even have the choice of which driver to use :). Because of licensing issues, a Squeak image or Squeak sources package is not available in Debian yet. So the user must download a proper image in order to get this script useful. Available images can be found in these web sites: The official Squeak home page: http://squeak.org The SqueakLand (international educational oriented) world: http://www.squeakland.org The spanish educative oriented Squeak page: http://squeak.educarex.es/ AUTHOR
This manual page was written by Jose L. Redrejo for the Debian project SEE ALSO
squeakvm(1). SQUEAK(1)

Featured Tech Videos

All times are GMT -4. The time now is 03:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy