How to list the Autosys jobs thats in failure status using Shell Script | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

How to list the Autosys jobs thats in failure status using Shell Script

UNIX for Dummies Questions & Answers


Tags
autosys

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-24-2008
supragna supragna is offline
Registered User
 
Join Date: Jun 2008
Last Activity: 7 January 2010, 3:29 AM EST
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
How to list the Autosys jobs thats in failure status using Shell Script

Hello There,
I am pretty much new to Shell Scripting and also to AutoSys. I would like to know how to list the Autosys jobs in FA status using shell scripting. I would like to get an email alert as and when any Autosys job fails. Also, it should give the path of the Log file.

Could you please respond to this query at the earliest.

Thanks,
Supragna
Sponsored Links
    #2  
Old 06-24-2008
supragna supragna is offline
Registered User
 
Join Date: Jun 2008
Last Activity: 7 January 2010, 3:29 AM EST
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by supragna View Post
Hello There,
I am pretty much new to Shell Scripting and also to AutoSys. I would like to know how to list the Autosys jobs in FA status using shell scripting. I would like to get an email alert as and when any Autosys job fails. Also, it should give the path of the Log file.

Could you please respond to this query at the earliest.

Thanks,
Supragna
Hello All,

This is urgent request. Could you please help.
Wud be great help if anyone can actually give me the code.

Best Regards,
Supragna
Sponsored Links
    #3  
Old 06-24-2008
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
code tag tagger
 
Join Date: Sep 2007
Last Activity: 28 August 2014, 10:17 AM EDT
Location: St. Gallen, Switzerland
Posts: 6,227
Thanks: 121
Thanked 451 Times in 411 Posts
Autosys? Never heared. I could start googling, but I am too lazy Maybe that Autosys Jobs produce Exit-Codes which you can check in the shell script with "$?". If not null, then send me a mail...
What is FA status? Failed? Does Autosys write those stati into some log or... ?
    #4  
Old 06-24-2008
er_ashu er_ashu is offline
Registered User
 
Join Date: Apr 2007
Last Activity: 17 May 2011, 1:58 PM EDT
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
If you are using a shell script in command parameter of AutoSys, check for the exit status and create an alert mechanism based on that.
And do check with your AutoSys support team on alerts and max run alarms.
Sponsored Links
    #5  
Old 11-12-2008
vijayhai vijayhai is offline
Registered User
 
Join Date: Aug 2008
Last Activity: 24 February 2009, 1:32 PM EST
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
How to list the Autosys jobs thats in failure status using Shell Script

You can write a shell script to cut the job name and status. Grep for FA status and email if found one.

ex:

count=`autorep -J jobname | cut -c108-109|grep "FA" |wc -l`

if [ $count -gt 0 ]
then
mailx -s "job failed" a@b.com < sample.txt
fi

Thanks
The Following User Says Thank You to vijayhai For This Useful Post:
sandipmahakud (07-29-2013)
Sponsored Links
    #6  
Old 11-12-2008
arunkumar_mca arunkumar_mca is offline
Registered User
 
Join Date: Oct 2004
Last Activity: 21 November 2013, 6:30 AM EST
Posts: 279
Thanks: 1
Thanked 1 Time in 1 Post
if you want to get all the failure that was run previously. use

autorep -J ALL | grep "FA"
The Following User Says Thank You to arunkumar_mca For This Useful Post:
mafat (3 Weeks Ago)
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Shell script - Finding Autosys job status venkatesht UNIX for Dummies Questions & Answers 1 01-10-2012 04:28 AM
Trigger a job on autosys failure ysrinu Shell Programming and Scripting 1 06-30-2008 10:12 AM
How to list the Autosys jobs thats in failure status using Shell Script supragna Shell Programming and Scripting 0 06-24-2008 05:21 AM
Searching Status for 2 Autosys jobs tekster757 UNIX for Dummies Questions & Answers 1 09-19-2007 09:42 AM
background jobs exit status and limit the number of jobs to run GrepMe Shell Programming and Scripting 1 06-11-2007 06:56 PM



All times are GMT -4. The time now is 02:15 PM.