wait # wait for background process to stop endtime=`date -u +%%s` totalsecs=$(($endtime-$TASK_STARTTIME)) echo "Task took "$totalsecs" seconds" ecflow_client --complete # Notify ecFlow of a normal end trap 0 # Remove all traps exit 0 # End the shell