Please help me to develop this script for autosys job

:wall:Hi All,
I want to build script to force start the list of child jobs under a box. I prepared this below script, but this script need to some bug fix at run time. Please help me to to develop this script. Please let me know if any thing require for this script. Advance thank for all..

module load 3rd/autosys/SSS
JOBNAME=$1;

for i in `autorep -j $JOBNAME | grep -v bx`

do

autorep -j $i awk '{
        if ($6 = SU)
                sendevent -E FORCE_STARTJOB `$i | awk '{print $1}'`
                autorep -j `$i | awk '{print $1}'`;
        fi
        }'
        echo `$!`;
done

To force start all the jobs under the parent job

$JOBNAME is parent job

autorep -w -J $JOBNAME | awk 'NR>4{print $1}' | while read jobname; do sendevent -E FORCE_STARTJOB "$jobname"; done

Hi Kamarraj,:wink:

Thank you for this great help. I am facing some bug while tried to execute. Actually I want to fore start child jobs which are fail under the main box. I believe mentioned while loop should keep the value for failed child job. Please help me if any thing I need to modify.

autorep -w -J $JOBNAME |grep -E '-v bx | FA'| awk 'NR>4{print $1}' | while read jobname; do sendevent -E FORCE_STARTJOB "$jobname"; done

:confused:

This will retrieve your failed jobs and issue force start command

 
autorep -w -J $JOBNAME |grep -w FA | while read jobname others; do sendevent -E FORCE_STARTJOB "$jobname"; done