• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

scheduling using Quartz

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

I want to run a cron job from my java applications using Quartz. The thing is I can not understand how to go about it. i have read their documentation and examples but they do not present a clear pciture as to how Quartz can be used to schedule jobs.

Can anyone give me step by step instructions about how to go about it. I know i am asking a tedious explanation but any help will be greatly appreciated.

thanks and regards
smriti
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to:
1) Get a scheduler
2) One or more jobdetails (each jobdetail will be associated with a class that does the work (by implementing one of the job interfaces).
3) For each jobdetail you need a crontrigger.
4) Schedule the jobdetail with the crontrigger.

I don't have a good and clean example but I'll extract some code that I'm using that might give you some ideas.
(Code below is taken from a "when-I-have-time-over" project and is slightly modified since it is spread around in a couple of helper classes as of now)

[ December 07, 2004: Message edited by: Magnus Palm�r ]
 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm just starting to look into Quartz, myself, but the first hit under Google for "java quartz" is the following link: http://www.onjava.com/pub/a/onjava/2004/03/10/quartz.html. It appears to be a comprehensive discussion of Quartz with sample programs.

Hope this helps,
Joseph
reply
    Bookmark Topic Watch Topic
  • New Topic