I have set a crontab for execute a java service in every 8 hours in AIX(7.1) operating system. Once the crontab has done the job, the JAVA service should be end. This cronjob is working properly. But java service has not been closing its session at the end. Also this java service takes 3-4 hours to process the files.
Java sessions are accumulating day by day and eventually it leads to idle the application server.
Java Version 1.8
AIX 7.1
Crontab entry:
00 8 * * * cd /ibl/qnb/uat/app/adm/ADM_AUTOMATE_SERV && ./RUN.sh > /ibl/qnb/uat/logs/adm/ADM_AUTOMATE_SERV/run.log
If I execute the above statement manually, cronjob runs properly and closing the session at the end.
RUN.sh file:
/usr/java8_64/bin/java -Xmx1024m -jar ADM_AUTOMATE_SERV.jar
Below are the java sessions still running in the application server. Please have a look and advise what I'm going wrong?
30932996 7340260 0 Mar 25 - 0:00 sh -c cd /ibl/qnb/uat/app/adm/ADM_AUTOMATE_SERV && ./RUN.sh > /ibl/qnb/uat/logs/adm/ADM_AUTOMATE_SERV/run.log
31129600 29425670 21 Mar 30 - 2953:54 /usr/java8_64/bin/java -Xmx1024m -jar ADM_AUTOMATE_SERV.jar
32505878 33620190 25 08:00:00 - 216:49 /usr/java8_64/bin/java -Xmx1024m -jar ADM_AUTOMATE_SERV.jar
32833638 40304674 25 Mar 28 - 4183:00 /usr/java8_64/bin/java -Xmx1024m -jar ADM_AUTOMATE_SERV.jar
33620190 7340260 0 08:00:00 - 0:00 sh -c cd /ibl/qnb/uat/app/adm/ADM_AUTOMATE_SERV && ./RUN.sh > /ibl/qnb/uat/logs/adm/ADM_AUTOMATE_SERV/run.log
33947736 7340260 0 Apr 04 - 0:00 sh -c cd /ibl/qnb/uat/app/adm/ADM_AUTOMATE_SERV && ./RUN.sh > /ibl/qnb/uat/logs/adm/ADM_AUTOMATE_SERV/run.log
34406468 35389628 22 Apr 03 - 965:58 /usr/java8_64/bin/java -Xmx1024m -jar ADM_AUTOMATE_SERV.jar
34471988 7340260 0 Mar 31 - 0:00 sh -c cd /ibl/qnb/uat/app/adm/ADM_AUTOMATE_SERV && ./RUN.sh > /ibl/qnb/uat/logs/adm/ADM_AUTOMATE_SERV/run.log
35389628 7340260 0 Apr 03 - 0:00 sh -c cd /ibl/qnb/uat/app/adm/ADM_AUTOMATE_SERV && ./RUN.sh > /ibl/qnb/uat/logs/adm/ADM_AUTOMATE_SERV/run.log
37290036 34471988 24 Mar 31 - 2444:53 /usr/java8_64/bin/java -Xmx1024m -jar ADM_AUTOMATE_SERV.jar
38863052 7340260 0 Apr 02 - 0:00 sh -c cd /ibl/qnb/uat/app/adm/ADM_AUTOMATE_SERV && ./RUN.sh > /ibl/qnb/uat/logs/adm/ADM_AUTOMATE_SERV/run.log
39452824 30212288 30 Mar 26 - 5463:39 /usr/java8_64/bin/java -Xmx1024m -jar ADM_AUTOMATE_SERV.jar
40304674 7340260 0 Mar 28 - 0:00 sh -c cd /ibl/qnb/uat/app/adm/ADM_AUTOMATE_SERV && ./RUN.sh > /ibl/qnb/uat/logs/adm/ADM_AUTOMATE_SERV/run.log
41484458 7340260 0 Apr 01 - 0:00 sh -c cd /ibl/qnb/uat/app/adm/ADM_AUTOMATE_SERV && ./RUN.sh > /ibl/qnb/uat/logs/adm/ADM_AUTOMATE_SERV/run.log
43188280 23003326 27 Mar 22 - 8316:22 /usr/java8_64/bin/java -Xmx1024m -jar ADM_AUTOMATE_SERV.jar
46596146 20512790 29 Mar 27 - 4821:18 /usr/java8_64/bin/java -Xmx1024m -jar ADM_AUTOMATE_SERV.jar
46792934 27132138 26 Mar 24 - 6883:58 /usr/java8_64/bin/java -Xmx1024m -jar ADM_AUTOMATE_SERV.jar
46923976 30932996 26 Mar 25 - 6177:01 /usr/java8_64/bin/java -Xmx1024m -jar ADM_AUTOMATE_SERV.jar
Highly appreciate your time and efforts for this matter.