Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to run package procedure using Crontab

OraFighterFeb 1 2012 — edited Feb 14 2012
Below is my crontab script to run . It is working fine in if I run it manually like
sh crontest

but if i call it in crontab , only echo is working , oracle commands are not working.

my crontab command is -> * * * * * sh /home/oracle/cron/crontest


*******************************************
crontest
*******************************************
#!/bin/sh

echo "Procedure start successfully : $(date) " >> /home/oracle/pro_test
sqlplus -s orpheus/frs@frs_ods<<END
set serveroutput on
exec pkg_orph_adhoc.pro_ca('3478409644','2011-07-01','2011-10-31');
insert into tt values(sysdate);
commit;
exit;
END
********************************************
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 13 2012
Added on Feb 1 2012
11 comments
465 views