Re: java application and import dump
Posted by Roshan on Feb 28, 2018; 4:52pm
URL: http://erman-arslan-s-oracle-forum.124.s1.nabble.com/java-application-and-import-dump-tp5202p5275.html
Thanks a lot Erman :)
Can you please guide me in setting up the cron
0 22 * * * [ -e /home/oracle/response/Y ] && /home/oracle/response/script.sh
In the above example, if file Y exists, script.sh will run.
The condition to check the content of file if true will be as follows
[oracle@RH-FTTH-DEV-DB1 ~]$ cat imp.sh
read n < test.txt
echo $n
if [ $n == true ]
then
imp OTC/psk123$ fromuser='OPS$IMCC_5X' touser='OTC' file=export281027.dmp log=import6.log
#echo "kkkkkkkk"
else
if [ $n == false ]
then
echo "Import cannot start"
else
cat /dev/null > test.txt
echo false > test.txt
fi
fi
How can i setup it in cron?
Regards,
Roshan