Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7491259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T15:57:00+00:00 2026-05-29T15:57:00+00:00

We have an application deployed on Tomcat 6. It’s built on Spring/Struts 2, and

  • 0

We have an application deployed on Tomcat 6. It’s built on Spring/Struts 2, and has several Quartz tasks scheduled.

We’d like to move some tasks away from Quartz and onto Linux’s cron, doing the very least amount of coding as possible. How do I run those Spring/Quartz tasks outside the Tomcat container and in a standalone Java application?


(UPDATE: Since someone wanted to know why we want to do this)

We wanted to move the scheduled tasks to their own Java applications because our Tomcat keeps dying on us. There are no errors logged. We suspect that this one huge Quartz task we have is the culprit, but whether it’s because of a memory leak or our Tomcat seg-faulting due to being set-up incorrectly, we still don’t know.

We wanted to isolate it by kicking it out of the Tomcat container, and see if Tomcat will still die intermittently. However, since the application is already live (though in closed beta), we wanted to troubleshoot this with the least amount of coding work, while still keeping it running (coz, you know, “new code, new problems” — FYI, we’re already considering a rewrite/re-engineering, but “firefighting” is a more urgent concern right now).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T15:57:02+00:00Added an answer on May 29, 2026 at 3:57 pm

    Apparently, the simplest way to go about this is to create a standalone Java application that calls the bean method you’re executing in Quartz:

    import org.springframework.context.*;
    import org.springframework.context.support.*;
    
    public class SomeJob {
    
        public static void main(String[] args) {
            ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
            MyBean myBean = (MyBean) ctx.getBean("myBean");
            myBean.someMethod();
        }
    
    }
    

    ..then, running this in cron.

    Meh.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a web application deployed on a tomcat server. There are certain scheduled
I have a WEB Application deployed in Tomcat. I would like to intercept all
I have an application that is deployed with ClickOnce, and has an option to
I have two applications deployed on tomcat. For each application I have defined their
I have a web application deployed on path /var/lib/tomcat6/webapps/abc/</code> in server.xml on path /etc/tomcat/server.xml
I have developed a java 1.4 web application.Application is deployed on jboss(tomcat). suppose my
I have a web application deployed on tomcat. In this application are ExecutorService to
I actually have an application deployed on a Tomcat server but in the future
I have a servlet application deployed on a tomcat 7.0 server (call it Server
I have a JSP web application deployed to tomcat. The url of the application

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.