Faulty Autosys job runs properly


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Faulty Autosys job runs properly
# 1  
Old 11-12-2007
Faulty Autosys job runs properly

There has been an instance, where to my surprise, an autosys jil script in which the LOGPATH directory was wrongly specified worked all fine.

It was actually a set of jobs with a box having two command jobs and a filewatcher. The filewatcher job had the wrong path used, i.e., other than what was given in the profile file and used by the other jobs. But still, the job ran as expected.

Can anyone come up with any kind of explanations for this behaviour?
# 2  
Old 11-12-2007
Could u post the jil code of the jobs& fw?
# 3  
Old 11-12-2007
here is the code..

Here I give you the jil script for the jobs..
/* ----------------- DWOPS_envoy_pull_acct_C ----------------- */

insert_job: DWOPS_envoy_pull_acct_C job_type: c
command: $SCRIPT_DIR/envoy_pull_acct.ksh
machine: gjsgjfjfsk
#owner: proddts
permission: gx
date_conditions: 1
days_of_week: mo,tu,we,th,fr
start_times: "05:30"
std_out_file: $LOGPATH/envoy_acct.log
std_err_file: $LOGPATH/envoy_acct.err
alarm_if_fail: 1
profile: /home/proddts/feeds/daily/envoy/scripts/envoy_profile.ksh


/* ----------------- DWOPS_envoy_NDM_file_C ----------------- */

insert_job: DWOPS_envoy_NDM_file_C job_type: c
machine: hfhagfjg
#owner: cmlprod
permission: gx
command: /data/ge_prod/NDM/OPSDW/ndm_acct.ksh

std_out_file: /data/ge_prod/NDM/OPSDW/logs/envoy_watch.log
std_err_file: /data/ge_prod/NDM/OPSDW/logs/envoy_watch.err


alarm_if_fail: 1
profile: /commercial/abinitio/GE/prod_user/sand/CML_CORE/config/prod.profile

/* ----------------- DWOPS_envoy_box_B ----------------- */

insert_job: DWOPS_envoy_box_B job_type: b
#owner: bzcvnzc
permission: gx
condition: success(DWOPS_envoy_pull_acct_C)
alarm_if_fail: 1
profile: /home/proddts/feeds/daily/envoy/scripts/envoy_profile.ksh

/* ----------------- DWOPS_envoy_move_file_C ----------------- */

insert_job: DWOPS_envoy_move_file_C job_type: c
box_name: DWOPS_envoy_box_B
command: $SCRIPT_DIR/ftp_fdr_file.ksh
machine: vnxmzmn
#owner: proddts
permission: gx
std_out_file: $LOGPATH/envoy_move.log
std_err_file: $LOGPATH/envoy_move.err
alarm_if_fail: 1
profile: /home/proddts/feeds/daily/envoy/scripts/envoy_profile.ksh


/* ----------------- DWOPS_envoy_watch_file_F ----------------- */

insert_job: DWOPS_envoy_watch_file_F job_type: f
box_name: DWOPS_envoy_box_B
machine: vmzxbmxm
#owner: cmzmzv
permission: gx
condition: success(DWOPS_envoy_move_file_C)
std_out_file: $LOG_PATH/envoy_watch.log
std_err_file: $LOG_PATH/envoy_watch.err
watch_file: /home/proddts/feeds/daily/envoy/data/fdr_envoy.dat.done
watch_interval: 60
alarm_if_fail: 1
profile: /home/proddts/feeds/daily/envoy/scripts/envoy_profile.ksh



/* ----------------- DWOPS_envoy_final_extract_C ----------------- */

insert_job: DWOPS_envoy_final_extract_C job_type: c
box_name: DWOPS_envoy_box_B
command: $SCRIPT_DIR/envoy_run_extract.ksh
machine: scmzbgm
#owner: procmm
permission: gx
condition: success(DWOPS_envoy_watch_file_F)
std_out_file: $LOGPATH/envoy_extract.log
std_err_file: $LOGPATH/envoy_extract.err
alarm_if_fail: 1
profile: /home/proddts/feeds/daily/envoy/scripts/envoy_profile.ksh
Do note the wrong use of LOG_PATH instead of LOGPATH

AND THE PROFILE FILE HAS:-
#!/bin/ksh

SCRIPT_DIR=/home/proddts/feeds/daily/envoy/scripts; export SCRIPT_DIR
FEED_NAME='envoy'; export FEED_NAME
LOGPATH=/home/proddts/feeds/daily/envoy/logs; export LOG_PATH

. /etc/profile
Now??
Any takers?
Smilie

Last edited by pranavagarwal; 11-14-2007 at 02:54 AM.. Reason: private info
# 4  
Old 11-14-2007
Ok , my theory here ( i can't access to an autosys system right now and you didn't post the /etc/profile ) .

The autosys profile scripts loads in the same shell that the jobs , for example :

Code:
profile: /home/proddts/feeds/daily/envoy/scripts/envoy_profile.ksh
insert_job: DWOPS_envoy_final_extract_C job_type: c

Executes the same way that:

Code:
. /home/proddts/feeds/daily/envoy/scripts/envoy_profile.ksh
DWOPS_envoy_final_extract_C

So it is not always necesary to export the variables inside the profile.

To check this just echo the vars inside a test script an redirect the output to an external file.

Example:
Code:
Test.ksh:
echo "SCRIPT_DIR=${SCRIPT_DIR}" >> /tmp/var_echoes
echo "LOGPATH=${LOGPATH}" >> /tmp/var_echoes

/* ----------------- TEST_VARS ----------------- */

insert_job: TEST_VARS job_type: c
command: $SCRIPT_DIR/Test.ksh
machine: vmzxbmxm
#owner: cmzmzv
permission: gx
std_out_file: $LOG_PATH/test.log
std_err_file: $LOG_PATH/test.err
alarm_if_fail: 1
profile: /home/proddts/feeds/daily/envoy/scripts/envoy_profile.ksh

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Show faulty shows PS1 faulty

I plugged both power cables in both power supply. When I unplugged each power cable one by one, the SPARC T4-1 machine keep running. However, show faulty command shows below message. (I have also attached the picture of both power supply) -> show faulty Target ... (1 Reply)
Discussion started by: z_haseeb
1 Replies

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

3. Programming

Autosys job in UNIX

Hi all, I am new to Unix. I would like to create a Autosys job in Unix. Can you please suggest. below is the requirement. 1. Need t Send in email every 30 minutes from 11 am to 3:00 PM. E-mail should only be sent ONLY when below Query have data return. select * from emp where... (1 Reply)
Discussion started by: vasuvv
1 Replies

4. Shell Programming and Scripting

Job runs manually, doesn't work in crontab

I have a script (/home/admin/run_bkup.sh) that I can run manually to kick off an executable job. I want to run it in crontab, but it doesn't work. Here's the script: shell=/bin/bash today=$(date +"%m-%d-%y") /opt/CPsuite-R77/fw1/bin/upgrade_tools/upgrade_export mgt-svr-bkup-$today << EOF y... (18 Replies)
Discussion started by: df08388
18 Replies

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

6. UNIX for Advanced & Expert Users

list of job autosys

hi all would like to know a list of job in the my autosys . which is the command for extract it? thanks a lot regards FrancescoIt (1 Reply)
Discussion started by: FrancescoIt
1 Replies

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

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

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

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