Link to home
Start Free TrialLog in
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

SOLUTION
Avatar of omarfarid
omarfarid
Flag of United Arab Emirates image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jaisonshereen
jaisonshereen

ASKER

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 !
what is the size of this file?

try

strings show_inactive_contacts_with_open_issues.mail
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#
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
yea right ..production oracle database is down...!
so only if it is up i can check these mails ?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial