09-14-2010
Need help to check the jobs status
Hello All,
I'm new in shell scripting and would like to write an automated script that will check few jobs for the completion, and restart the process based on the jobs status. I am not quite sure how do I check the job status... Can someone please help? Any help will be appreciated. Thanks in advance!
-- I call the job names are pre_* & post_*, the script will check post jobs should have completed after the pre job going by timestamp.
example: following are the jobs that I need to check... before
ls -ltr p*
pre_1*
post_2*
pre_3*
pre_4*
pre_5*
pre_6*
pre_7*
pre_8*
post_1*
post_2*
post_3*
post_4*
post_5*
post_6
---------- Post updated at 11:57 AM ---------- Previous update was at 09:39 AM ----------
Quote:
Originally Posted by
mohullah
Hello All,
I'm new in shell scripting and would like to write an automated script that will check few jobs for the completion, and restart the process based on the jobs status. I am not quite sure how do I check the job status... Can someone please help? Any help will be appreciated. Thanks in advance!
-- I call the job names are pre_* & post_*, the script will check post jobs should have completed after the pre job going by timestamp.
example: following are the jobs that I need to check... before
ls -ltr p*
pre_1*
post_2*
pre_3*
pre_4*
pre_5*
pre_6*
pre_7*
pre_8*
post_1*
post_2*
post_3*
post_4*
post_5*
post_6
ok following command shows me the the name, time stamps they completed...now I need to check if the files are from previous business day... how do i check?
ls -ltr p* | awk '{print $6,$7, $8, $9}'
output:
Sep 10 14:18 pre_*
Sep 13 10:55 pre_*
Sep 13 10:55 pre_*
Sep 13 14:59 post_*
Sep 13 15:00 post_*
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
We have a text file which has the following data.
ISA~00~ ~00~ ~ZZ~VISTN ~ZZ~U1CAD ~051227~183
7~U~00200~000011258~0~P~<
GS~FA~EE05J~U1CAD~051227~1831~000011258~X~002002
ST~997~0001
AK1~SH~247
AK2~856~2470001
AK5~A
AK2~856~2470002
AK5~A... (3 Replies)
Discussion started by: isingh786
3 Replies
2. Shell Programming and Scripting
i need to execute 5 jobs at a time in background and need to get the exit status of all the jobs i wrote small script below , i'm not sure this is right way to do it.any ideas please help.
$cat run_job.ksh
#!/usr/bin/ksh
####################################
typeset -u SCHEMA_NAME=$1
... (1 Reply)
Discussion started by: GrepMe
1 Replies
3. UNIX for Dummies Questions & Answers
I need to search for a failed status of 2 autosys jobs which write to the same logfile. Is there any way to do that on one line? I already know the following doesn't work, but is there a way to get it to work, or will I have to do a loop?
RUN_STATUS=autorep -J jobname jobname
if
then
... (1 Reply)
Discussion started by: tekster757
1 Replies
4. Solaris
Hi SunOS Experts
where will look up to correct the problem with my sunos, it normally shutdown on its own and reboot itself.
i am suspecting that somebody has scheduled it to be doing like that . which file can i look up to correct this problem.this is a server that is suppose to be up 24/7.... (2 Replies)
Discussion started by: dba
2 Replies
5. Shell Programming and Scripting
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... (0 Replies)
Discussion started by: supragna
0 Replies
6. Shell Programming and Scripting
Question for anyone that might be able to help:
My objective is to eheck if a file (a source file) exists in a directory. If it does then, I'd like to call an application (Informatica ETL file...not necessary to know) to run a program which extracts data and loads it into multiple targets.
... (6 Replies)
Discussion started by: jnanasakti
6 Replies
7. UNIX for Dummies Questions & Answers
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... (5 Replies)
Discussion started by: supragna
5 Replies
8. AIX
hello ,
How do i to check the status of ypbind on AIX(5.3) platform ?
Thanks
AVK Linux (1 Reply)
Discussion started by: avklinux
1 Replies
9. Shell Programming and Scripting
I have some server ( IBM , Dell ) , our data center is not in the same location with office , therefore , I do not know if the HD lamp is flash when the HD is fault , can advise if I can write a script to check if the HD is normal running or not ?
thanks (1 Reply)
Discussion started by: ust
1 Replies
10. Shell Programming and Scripting
Hi Folks,
Please help me ,I need a unix shell script to check for multiple jobs running. if there are multiple backup Jobs running then it should be trigger an email .
Thanks,
Anand T (1 Reply)
Discussion started by: nandu67
1 Replies