Please help me to develop this script for autosys job


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Please help me to develop this script for autosys job
# 1  
Old 07-27-2012
MySQL Please help me to develop this script for autosys job

SmilieHi 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..

Code:
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


Last edited by pradipta_pks; 07-27-2012 at 07:12 AM..
# 2  
Old 07-27-2012
To force start all the jobs under the parent job

$JOBNAME is parent job

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

# 3  
Old 07-28-2012
Bug

Quote:
Originally Posted by itkamaraj
To force start all the jobs under the parent job

$JOBNAME is parent job

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

Hi Kamarraj,Smilie

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.

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

Smilie
# 4  
Old 07-30-2012
This will retrieve your failed jobs and issue force start command

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

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Suggestion in Autosys job

Hi, I am new to Unix and Autosys. I have written Oracle query. Now I would like to create Autosys job. below is the requirement. Send in email every 30 minutes from 11 to 4:00 PM. E-mail should only be sent ONLY when below Query have data return. Email format: To: , From: , Email... (1 Reply)
Discussion started by: vasuvv
1 Replies

2. UNIX for Dummies Questions & Answers

To run ksh script via autosys job without asking password for file transfer

I've K shell script. It will transfer the files from one server to other server using 'SCP' command. While running the script alone as a command line in UNIX ssh terminal its running with out asking password and files are transferred with out asking for password. But by running the script using... (6 Replies)
Discussion started by: maheshbabu
6 Replies

3. UNIX for Advanced & Expert Users

Autosys Job: Job did not start

I have submitted an autosys job and force start it. Autosys hit the job 4 times to restart but it did not start and finally I terminate the job. Any idea why the job did not start. Below is the code I executed. 1214 missun0ap /export/home/bzn97r/develop/dswi/jil$ sendevent -E FORCE_STARTJOB... (0 Replies)
Discussion started by: jnrohit2k
0 Replies

4. Windows & DOS: Issues & Discussions

AutoSys Job not waiting for script to complete

I'm not sure if this is the right place to post this issue...but here goes... I am converting a set of windows jobs from Control-M to AutoSys r11.3. The same command line is being executed in both systems. The Control-M job runs to compltion in about 1.5 hours, waiting for the entire batch... (3 Replies)
Discussion started by: ajomarquez
3 Replies

5. UNIX for Dummies Questions & Answers

Shell script - Finding Autosys job status

Hi, There are 2000 jobs in the list and i need to draw their status. I put all the jobs in the list and trying to read one by one from the list and to find out the status. Help me out in correcting the script. #!/bin/csh for a in $(cat Jobs_List.txt); do source <<path>> autorep -j $a... (1 Reply)
Discussion started by: venkatesht
1 Replies

6. Shell Programming and Scripting

Autosys Job

I need to know the list of autosys job that run between given time. I have the following command. job_depends -t -J abc% -F "12/25/2010 03:00" -T "12/26/2010 05:00" Above command will give the list of job that run between time 3 AM and 5 AM. But the it gives me in random order how to... (1 Reply)
Discussion started by: diehard
1 Replies

7. UNIX for Dummies Questions & Answers

Autosys Job.

Hi Can any one tell me free online good book for autosys job. Also whats the basic difference between Autosys job and cron job. Thanks in advance. (2 Replies)
Discussion started by: diehard
2 Replies

8. Shell Programming and Scripting

autosys job configuration for job failure.

We need to configure autosys that when a job fails continously for 3 times, we need to call another job. Is this possible in Autosys, or can anyone advice on the alternative. (2 Replies)
Discussion started by: sangea
2 Replies

9. Shell Programming and Scripting

autosys job name in the called script

Hi, i have an autosys job 'AUTJOBA' that calls a script script1.sh Now, inside the script i would like to know the autosys job that kicked off this script. When AUTJOBA runs script1.sh, will it set an environmental variable for this shell session that can be accessed within this script? ... (1 Reply)
Discussion started by: ysrinu
1 Replies

10. UNIX for Advanced & Expert Users

Documentation and books on Autosys Job Control Tool from Autosys

My project uses Autosys. I am new to this product and I don't know where to start from. Q1. Please provide me the link where I can get Autosys documentation Q2. Please refer a good book on Autosys. (Beginner/Intermediate Level) (0 Replies)
Discussion started by: gram77
0 Replies
Login or Register to Ask a Question