• 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
  • Bear Bibeault
  • Liutauras Vilda
  • Devaka Cooray
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
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: 43011
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
 
Did you just should on me? You should read this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!