jaisonshereen
asked on
How to check this cronjob shellscript completed or not ?
Can u tell me where to check whether this shell script successfully processed or not?
sqlplus -s user/pass@production @$SQL_CRON_HOME/show_inactive_contacts_with_open_issues_body.sql > $SQL_CRON_HOME/tmp/show_inactive_contacts_with_open_issues.mail
if (`/bin/cat $SQL_CRON_HOME/tmp/show_inactive_contacts_with_open_issues.mail | /usr/ucb/wc -l` > 21) then
sqlplus -s user/pass@production @$SQL_CRON_HOME/show_inactive_contacts_with_open_issues_header.sql > $SQL_CRON_HOME/tmp/show_inactive_contacts_with_open_issues.mail1
cat $SQL_CRON_HOME/tmp/show_inactive_contacts_with_open_issues.mail >> $SQL_CRON_HOME/tmp/show_inactive_contacts_with_open_issues.mail1
tail +2 $SQL_CRON_HOME/tmp/show_inactive_contacts_with_open_issues.mail1 | /usr/lib/sendmail -t
else
echo "No inactive contacts to report today"
endif
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
what is the size of this file?
try
strings show_inactive_contacts_wit h_open_iss ues.mail
try
strings show_inactive_contacts_wit
ASKER
ROOT@pythia# strings show_inactive_contacts_wit h_open_iss ues.mail
ERROR: ORA-01034: ORACLE not available
ORA-07429: smsgsg: shmget() failed to get segment.
SVR4 Error: 2: No such file or directory
ROOT@pythia# pg show_inactive_contacts_wit h_open_iss ues.mail
ERROR: ORA-01034: ORACLE not available
ORA-07429: smsgsg: shmget() failed to get segment.
SVR4 Error: 2: No such file or directory
ROOT@pythia# more show_inactive_contacts_wit h_open_iss ues.mail
ERROR: ORA-01034: ORACLE not available
ORA-07429: smsgsg: shmget() failed to get segment.
SVR4 Error: 2: No such file or directory
ROOT@pythia# ls show_inactive_contacts_wit h_open_iss ues.mail
show_inactive_contacts_wit h_open_iss ues.mail
ROOT@pythia# ls -l show_inactive_contacts_wit h_open_iss ues.mail
-rw-rw-r-- 1 oracledb corpdb 133 May 26 05:55 show_inactive_contacts_wit h_open_iss ues.mail
ROOT@pythia#
ERROR: ORA-01034: ORACLE not available
ORA-07429: smsgsg: shmget() failed to get segment.
SVR4 Error: 2: No such file or directory
ROOT@pythia# pg show_inactive_contacts_wit
ERROR: ORA-01034: ORACLE not available
ORA-07429: smsgsg: shmget() failed to get segment.
SVR4 Error: 2: No such file or directory
ROOT@pythia# more show_inactive_contacts_wit
ERROR: ORA-01034: ORACLE not available
ORA-07429: smsgsg: shmget() failed to get segment.
SVR4 Error: 2: No such file or directory
ROOT@pythia# ls show_inactive_contacts_wit
show_inactive_contacts_wit
ROOT@pythia# ls -l show_inactive_contacts_wit
-rw-rw-r-- 1 oracledb corpdb 133 May 26 05:55 show_inactive_contacts_wit
ROOT@pythia#
so the script is running but oracle is down or not reachable (if on some other system). start oracle database or check why it is not reachable
ASKER
yea right ..production oracle database is down...!
ASKER
so only if it is up i can check these mails ?
yes
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
more show_inactive_contacts_wit
is not working and not giving any output !