![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Setting cronjobs... | krworks | Shell Programming and Scripting | 4 | 06-06-2008 03:46 AM |
| control over shell script | JLJ | Shell Programming and Scripting | 3 | 01-22-2007 02:16 AM |
| using regular expressions in c shell control structure | ballazrus | Shell Programming and Scripting | 3 | 02-20-2006 12:59 AM |
| Cronjobs | mcastill66 | AIX | 1 | 05-31-2005 03:15 PM |
| cronjobs | tamer | UNIX for Dummies Questions & Answers | 3 | 01-22-2001 02:48 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
How to Control Cronjobs using Shell Script??
Hi All,
Now i am running the 3 oracle procedures one by one manually. Query: If 1st Procedure OUT_PUT is Success, then call 2nd Procedure. If 2nd Procedure OUT_PUT is Success, then call 3rd Procedure. If 1st Procedure is failed, then no need of calling the other procedures. How to Schedule 1st, 2nd, 3rd Procedures jobs are@ ############################################### SCHEDULE JOBS ############################################### # 30 01 * * * /u14/ods/scripts/in_pps_state_change.sh >> /u14/ods/scripts/scriptslog/in_other_mail.log 2>&1 # 00 03 * * * /u14/ods/scripts/in_pps_cos_change.sh >> /u14/ods/scripts/scriptslog/in_other_mail.log 2>&1 # 30 04 * * * /u14/ods/scripts/in_pps_usage_change.sh >> /u14/ods/scripts/scriptslog/in_other_mail.log 2>&1 ################################################ CALLING ORACLE PROCEDURE FROM SHELL SCRIPT ################################################ Eg of SP calling:: in_pps_usage_change.sh RETVAL=`sqlplus -s ODS/ODS@ODSDB <<EOF SET SERVEROUTPUT ON SIZE 100000 Declare OUT_STATUS NUMBER; OUT_MSG VARCHAR2(200); Begin ODS_SP_REMOVE_PRE_SUB_DUP(OUT_STATUS, OUT_MSG); dbms_output.put_line ('KeepThis '||OUT_STATUS ||' '||nvl(OUT_MSG,'')); End; / SET SERVEROUTPUT OFF EXIT; EOF` X=`echo $RETVAL | grep KeepThis | awk '{print $2}'` Y=`echo $RETVAL | grep KeepThis | awk '{print $3}'` echo " " >> $USER_LOG echo "Procedure: ODS_SP_REMOVE_PRE_SUB_DUP output is: " >> $USER_LOG echo "OUT_STATUS= $X" >> $USER_LOG echo "OUT_MSG= $Y " >> $USER_LOG ################################################ Please provide me the solution of my query.. Thanks&Regards Hanuma |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|