Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 524
  • Last Modified:

CronTrigger Expression

Hey experts,

 Using the org.quartz.CronTrigger class (whose doc. is found at: http://quartz.sourceforge.net/javadoc/org/quartz/CronTrigger.html). I have two questions:

1- If I want an event scheduled to occur every 15 minutes, would that be its expression??

"0 0/5 * * * ?"  

2- If I want an event scheduled to occur every 15 minutes, starting after 20 minutes from now, what would be its expression??
0
mte01
Asked:
mte01
  • 2
  • 2
  • 2
2 Solutions
 
sciuriwareCommented:
1)  0 00,15,30,45 * * *

2) is not implemented, got to do it yourself.

;JOOP!
0
 
sciuriwareCommented:
This happens to be a LINUX/UNIX question;
fine scheduling could be done from your own JAVA program,
which should run in the background.

;JOOP!
0
 
objectsCommented:
2) perhaps use a SImpleTrigger to schedulke your CronTrigger
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
mte01Author Commented:
>>sciuriware

1) Isn't my expression also correct??
2) After thinking of it, it's not worth implementing

>>objects

2) I ned to conform to what has been used in the project before....(they have used the Cron Trigger), so it's not worth implementing...
0
 
objectsCommented:
> (they have used the Cron Trigger)

so how did they use it?
0
 
mte01Author Commented:
>>objects

They used CronTrigger, but they haven't used this "starting after 20 minutes from now" requirement, and now that I see that it can't be implemented using CronTrigger, I prefer that I don't provide this option at all (seeing that it's not that important) instead of doing a whole new implementation of SimpleTrigger (& thus changing the design of DB tables that already have fields for stored Cron Expressions).
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now