Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
script2 & script3 & script4
script2 && script3 && script4
#!/bin/ksh
#script2
...
...
#All OK
exit 0
Script1.ksh
Script2.ksh &
Script3.ksh &
Script4.ksh &
# I need to wait until the whole Script2,3,and 4 to be finish
# first then run Script5
wait
Script5.ksh
LoadData(){
Script2.ksh & Script3.ksh & Script4.ksh &
wait
}
Script1.ksh
LoadData
Script5.ksh
Script1.ksh
Script2.ksh &
Script3.ksh &
Script4.ksh &
# I need to wait until the whole Script2,3,and 4 to be finish
# first then run Script5
wait
Script5.ksh &
Script6.ksh &
# I need to wait until Script5 and Script6 to be finish before quit the main script
wait
script1 &
script2 &
script3 &
while :
do
set -A arr $(jobs -p) # arr is now an array of background job process numbers
[[ ${#arr[*]} -gt 0 ]] || break # break out of the loop if the array is empty i.e. all jobs have finished
sleep 10 # wait 10 seconds before retrying
done
TOT_WAIT=0
SHORT_WAIT=10
MAX_WAIT=300
while [ : ]
do
set -A arr $(jobs -p)
[[ ${#arr[*]} -gt 0 ]] || break;
[[ $TOT_WAIT -gt $MAX_WAIT ]] && { kill ${arr[*]}; break; }
sleep $SHORT_WAIT
(( TOT_WAIT += $SHORT_WAIT ))
done;