This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of The Career Toolkit and have Mark Herschberg on-line!
See this thread for details.
Win a copy of The Career Toolkit this week in the Jobs Discussion forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Client API for Quartz

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Is there any client API for quartz. I need some information on this? Can any body help me on this.

Thanks,
Prasuna.
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How would a "client API" be different from the actual API?
 
Gnana Prasuna
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Before placing the values into quartz related tables, i would like to see the nextFiretime at client side. Is there any way to get the NextFireTime()?
 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Print the value on a JSP page and display it to the user (Client) what is the problem in that?
 
Gnana Prasuna
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

After setting the cronEcpression to Trigerr, when i tried to print the nextFireTime() i am getting null, insted of date object. After populating quartz related tables i was getting nextFireTime(). Before poplating the quartz related tables, i need NextFireTime() of that particular cron expression.
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the Java Docs for Trigger#getNextFireTime().

There, its clearly stated that,

If the trigger will not fire again, null will be returned.

 
Gnana Prasuna
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Before scheduling a job using scheduler, i need next fire time.

For that i used below code snippet.

Trigger trigger = new CronTrigger("0 0 3 */1 * ? *");
and after that i used getNetFireTime() of trigger class . I got null.

And i am able get nextfireTime for the above cron expression by getting trigger object using scheduler instance.
 
Sagar Rohankar
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Gnana Prasuna wrote:Before scheduling a job using scheduler, i need next fire time.

And i am able get nextfireTime for the above cron expression by getting trigger object using scheduler instance.



A quote out the last line from the above API link I provided,

The value returned is not guaranteed to be valid until after the Trigger has been added to the scheduler


So you need to register this Trigger, (with job of course) to the scheduler, in order to get next trigger time
 
reply
    Bookmark Topic Watch Topic
  • New Topic