The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 03-18-2008
era
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
Why don't you keep them all in a single script, and start that at 01:30? Then it's much easier to see if the first subjob failed.

Code:
if in_pps_state_change.sh; then
  in_pps_cos_change.sh
  in_pps_usage_change.sh
fi
You could even run them with "at" if running them at a particular time is important. But then, you need to be sure that in_pps_state_change.sh finishes before the next job is due.

Code:
if in_pps_state_change.sh; then
  # Todo: maybe die a horrible death if the time is already past 03:00
  echo /u14/ods/scripts/in_pps_cos_change.sh | at 03:00
  echo /u14/ods/scripts/iin_pps_usage_change.sh | at 04:30
fi

Last edited by era; 03-18-2008 at 07:40 AM.. Reason: Add "at" example