2016-06-28

Linux shell script for Oracle DBA + cron

Ref. below.
http://www.oracle.com/technetwork/articles/linux/saternos-scripting-088882.html

Connect to sqlPlus in shell script and run a .sql script file
sqlplus -s admin/password << EOF
whenever sqlerror exit sql.sqlcode;
set echo off
set heading off
@pl_script_1.sql
@pl_script_2.sql
exit;
EOF

Cron 등록하는 법
http://zetawiki.com/wiki/%EB%A6%AC%EB%88%85%EC%8A%A4_%EB%B0%98%EB%B3%B5_%EC%98%88%EC%95%BD%EC%9E%91%EC%97%85_cron,_crond,_crontab

* * * * * /root/every_1min.sh           매 1분마다 /root/every_1min.sh 를 수행
15,45 * * * * /root/every_30min.sh  매시 15분, 45분에 /root/every_30min.sh 를 수행

*----------------------

Spring quartz 사용시
http://dakccom.tistory.com/entry/Support-for-specifying-both-a-day-of-week-AND-a-day-of-month-parameter-is-not-implemented
초분시일월주년

No comments:

Post a Comment