Hi Forum,
Good Day!
I have created an empty html file wtih permissoin 777
created shell script(with permission 777) , code is below.
#=======================start==============
. /data09/oracle/apps_st/appl/D_oraapp095.env
rm -rf /home/mnp/Test_log.txt
echo "=============================================================================<br><br>" >> /home/mnp/Test_log.txt
echo -e "\t Program - Daily Rates Import and Calculation <br>" >> /home/mnp/Test_log.txt
echo "--------------------------------------------------------<br><br>" >> /home/mnp/Test_log.txt
unixvar6=`sqlplus -s apps/XXXX@DEV <<EOF
SET FLAGGER OFF FEEDBACK OFF ECHO OFF TERMOUT OFF VERIFY OFF HEADING OFF COLSEP |
SELECT status_code
FROM APPS.fnd_conc_req_summary_v
WHERE request_id =
( SELECT MAX(request_id)
FROM APPS.fnd_conc_req_summary_v
WHERE CONCURRENT_PROGRAM_ID = 44496
--request_type_display_name = 'Program - Daily Rates Import and Calculation'
AND phase_code='C'
);
Exit
EOF`
unixvar_6=`sqlplus -s apps/XXXX@DEV <<EOF
SET FLAGGER OFF FEEDBACK OFF ECHO OFF TERMOUT OFF VERIFY OFF HEADING OFF COLSEP |
SELECT 'Request ID: '||request_id||' Phase Code: '||
decode(phase_code,'C','COMPLETED')||' Status Code: '||
decode(status_code,'C','COMPLETED',
'D', 'CANCELLED',
'E', 'ERROR',
'G', 'WARNING',
'M','NO MANAGER',
'S','SUSPENDED',
'U', 'DISABLED',
'X', 'TERMINATED')||' Start Date: '||TO_CHAR(actual_start_date,'DD-MON-YYYY HH24:MI:SS')
||' End Date: '||TO_CHAR( actual_completion_date,'DD-MON-YYYY HH24:MI:SS')
||' Program Name: '||USER_CONCURRENT_PROGRAM_NAME
FROM APPS.fnd_conc_req_summary_v
WHERE request_id =
( SELECT MAX (request_id)
FROM APPS.fnd_conc_req_summary_v
WHERE CONCURRENT_PROGRAM_ID = 44496
AND phase_code = 'C' );
Exit
EOF`
echo "STDCERR: ${STDCERR}"
STDCERR=`echo $unixvar6 | sed -e 's/Connected. //'`
if [ $unixvar6 == 'E' ]
then
echo " CRITICAL : Request set is completed with Error <br><br>" >> /home/mnp/Test_log.txt
echo " $unixvar_6 " >> /home/mnp/Test_log.txt
else
echo " Normal: Request set is completed <br><br>" >> /home/mnp/Test_log.txt
echo " $unixvar_6 " >> /home/mnp/Test_log.txt
fi
#=====================================end====
Here I could get the program request details when i ran the script manually.
But i don't get any details when I schedule them thru crontab.
Can Someone help me why log is storing the details ?
Thanks in Advance!
-Kartheek