Avatar of jaisonshereen
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

Open in new window

Unix OSLinuxScripting Languages

Avatar of undefined
Last Comment
jaisonshereen

8/22/2022 - Mon
SOLUTION
omarfarid

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
kiolqc

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
jaisonshereen

How to check this show_inactive_contacts_with_open_issues.mail


more show_inactive_contacts_with_open_issues.mail

is not working and not giving any output !
omarfarid

what is the size of this file?

try

strings show_inactive_contacts_with_open_issues.mail
ASKER
jaisonshereen

ROOT@pythia# strings show_inactive_contacts_with_open_issues.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_with_open_issues.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_with_open_issues.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_with_open_issues.mail
show_inactive_contacts_with_open_issues.mail
ROOT@pythia# ls -l show_inactive_contacts_with_open_issues.mail
-rw-rw-r--   1 oracledb corpdb       133 May 26 05:55 show_inactive_contacts_with_open_issues.mail
ROOT@pythia#
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
omarfarid

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
jaisonshereen

yea right ..production oracle database is down...!
ASKER
jaisonshereen

so only if it is up i can check these mails ?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
omarfarid

yes
ASKER CERTIFIED SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.