• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Deploying Quartz Scheduler in a Web server

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

I am having some trouble with Quartz. I need to run a job at 12 every midnight. This "Job" records every service that was called during the period of the day (which is saved in a table in the database) and saves the same in a text file. To do so, I am using Quartz. For now I have been running it in the Eclipse IDE and it works just fine. But now I need to deploy it on Apache Tomcat Server along with my services .... But is it possible to deploy a simple java application on the Server. Or is there any another way around this issue.


Many thanks and have a nice day
 
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Maya,
I created a war file that contains all the reqd jars plus java class for my project.
I used spring quartz schedular to point at the class/method that would be run every 4min.
I also included spring transaction handling to handle exceptions thrown within my application (i.e database issues etc).

The other approach would be to use window schedular to run the job. The job would contains all the jar + class files
and the schedular would point at your main class, to run the job.

I would use the first approach. it's cleaner and does not depend on the operating system.
Mat

 
There's a hole in the bucket, dear Liza, dear Liza, a hole in the bucket, dear liza, a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic