본문 바로가기
Development/Web Develope

톰캣에서의 Quartz 중복 실행 해결

by 버들도령 2021. 3. 25.
728x90

톰캣에서의 Quartz 중복 실행 해결

작업 환경 : CentOS + Tomcat + Spring.

Quartz Job runs twice or triple.
위와 같은 환경에서 Quartz 실행시 Job이 두개 이상 중복 실행되는 경우가 있습니다.
이럴때는... 다음과 같이 해주시면 됩니다.

※ 톰캣 server . xml 파일의  Host 설정 시 다음의 설정 값 추가

autoDeploy="false" deployOnStartup="false"


다들 잘 아시겠지만,
server.xml 파일의 위치는 /apache-tomcat-home/conf 폴더입니다.
<Host name="eclipse.naver.com"  appBase="webapps" unpackWARs="true" autoDeploy="false" deployOnStartup="false">

 

https://tomcat.apache.org/tomcat-8.0-doc/config/host.html

 

Apache Tomcat 8 Configuration Reference (8.0.53) - The Host Container

In many server environments, Network Administrators have configured more than one network name (in the Domain Name Service (DNS) server), that resolve to the IP address of the same server. Normally, each such network name would be configured as a separate

tomcat.apache.org

http://stackoverflow.com/questions/7223108/quartz-job-runs-twice-when-deployed-on-tomcat-6-ubuntu-10-04lts

 

Quartz job runs twice when deployed on tomcat 6/Ubuntu 10.04LTS

I run a Spring Framework/SmartGWT based web-app, with now an added Quartz job. The job is supposed to run every day at 2am, and picks winners from a DB table. From my logs I see it runs twice,

stackoverflow.com

http://forum.spring.io/forum/spring-projects/batch/63151-quartz-tomcat-multiple-duplicate-job-executions

 

728x90

댓글