?
Solved

CronTrigger Questions

Posted on 2006-03-20
29
Medium Priority
?
296 Views
Last Modified: 2012-06-22
Hey experts,

 Using the org.quartz.CronTrigger class (whose doc. is found at: http://quartz.sourceforge.net/javadoc/org/quartz/CronTrigger.html). I have a question:
If I want an event scheduled to occur every 40 minutes, would that be its expression??

"0 0/40 * * * ?"

or would that occur after 40 minutes from the start of each hour??
0
Comment
Question by:mte01
  • 10
  • 9
  • 6
25 Comments
 
LVL 92

Expert Comment

by:objects
ID: 16234390
no thats correct I think
0
 
LVL 3

Author Comment

by:mte01
ID: 16234400
>>objects

You mean, it would occur every 40 minutes..right??
i.e. if I scheduled it at 1:30 pm, it would occur at 1:40,2:20,3:00,3:40 pm...etc....right??
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16234402
AFAIK you can't. If Quartz can use at jobs, you may be able to do it with at
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 92

Accepted Solution

by:
objects earned 1000 total points
ID: 16234405
> You mean, it would occur every 40 minutes..right??

yes
0
 
LVL 3

Author Comment

by:mte01
ID: 16234409
>>CEHJ

Yes, I don't want it to be this way....
0
 
LVL 92

Expert Comment

by:objects
ID: 16234421
how can a comment that is wrong assist you :)
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16234433
>> how can a comment that is wrong assist you :)

I was wondering that too. Perhaps you can reopen the question mte01 and reassign the points you gave objects?
0
 
LVL 3

Author Comment

by:mte01
ID: 16234440
>>objects,CEHJ

>> how can a comment that is wrong assist you :)

It assisted me in the manner that if a manager asked for that option later, I can tell him that this cannot be done with the available classes. Thanks for your help guys!!
0
 
LVL 92

Expert Comment

by:objects
ID: 16234449
It can be done :)
0
 
LVL 3

Author Comment

by:mte01
ID: 16234494
Yes, ok..(I dont know how I didn't realize that)..I would request that this question be reopened
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16234501
In the meantime, you can test the expression you posted and let us know if it schedules *every forty minutes* and at no other time ;-)
0
 
LVL 3

Author Comment

by:mte01
ID: 16234537
>>CEHJ

Yes, I had already tried it & it worked...
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16234551
It's barely 40 minutes since you posted the question ;-)
0
 
LVL 3

Author Comment

by:mte01
ID: 16234571
>>CEHJ

I am working on an exisitng project that uses CronTrigger & that tells me when the next time of each execution is. I scheduled it at 1:30 pm my time, it executed at 1:40 pm, and told me that its next execution is 2:20 pm
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16234582
OK - i'm wrong then ;-)
0
 
LVL 92

Expert Comment

by:objects
ID: 16240461
> OK - i'm wrong then ;-)

If you haven't actually used Quartz I'd suggest you don't make comments on what it cannot do, all  that does is mislead people.

0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16241313
The question was about cron, not Quartz
0
 
LVL 92

Expert Comment

by:objects
ID: 16241433
ROTFL, helps to actually read the question before posting. It has nothing to do with cron.
0
 
LVL 3

Author Comment

by:mte01
ID: 16297968
>>Netminder

If you read the question carefully, you'll see that these two questions are different (this one talk about the trigger at the beginning of an hour - the other one talks about the trigger at a caculated time starting from now).
0
 
LVL 92

Expert Comment

by:objects
ID: 16298119
thats right, the two are different.
And CEHJ's comment is wrong.
0
 
LVL 3

Author Comment

by:mte01
ID: 16298160
>>objects

Yes, I would request the question also to be reopened so I can redistribute the points.
0
 
LVL 92

Expert Comment

by:objects
ID: 16304189
What about the points? This question is *not* the same as the other, what makes you think it is? (And why would someone ask the same question twice anyway)
0
 
LVL 92

Expert Comment

by:objects
ID: 16307742
Generally it is twice at the same time isn't it, not asking it again after its been answerd.
0
 
LVL 92

Expert Comment

by:objects
ID: 16307794
:)
0
 
LVL 3

Author Comment

by:mte01
ID: 16308308
Thanks Netminder...
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses
Course of the Month15 days, 3 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question