Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
Search
Recent Topics
Member Listing
Back to home page
Register
/
Login
[Expert]
How to add trigger without scheduling a job
Forum Index
->
Quartz
Author
Message
01/31/2012 10:18:28
Subject:
How to add trigger without scheduling a job
clarky
neo
Joined: 01/31/2012 10:11:45
Messages: 2
Offline
When I add a cron trigger to a job like so:
Scheduler.ScheduleJob(trigger);
it runs the job immediately rather than waiting for the scheduled time.
Is there a way to create triggers on a job that will only run at the time stipulated by the Cron expression and not before?
Thanks
01/31/2012 11:26:12
Subject:
Re:How to add trigger without scheduling a job
Bermudo
neo
Joined: 03/05/2010 22:34:35
Messages: 7
Location: Modena, Italy; Berlin, Germany; Madrid, Spain
Offline
Well, if the job fires immediately then that's what your cron expression indicates.
If you want to start it at a later date or time, you can set a start time for a trigger. See the documentation of the TriggerBuilder.
02/01/2012 10:22:40
Subject:
Re:How to add trigger without scheduling a job
clarky
neo
Joined: 01/31/2012 10:11:45
Messages: 2
Offline
The Cron expression is
0 32 8 ? * MON-FRI
i.e Fire at 8.32am Mon-Fri
Job attached to this trigger always fires when the trigger is added.
It happen for each of the 110 jobs in my schedule regardless of the Cron expression(obviously each one is different)
02/01/2012 10:40:32
Subject:
Re:How to add trigger without scheduling a job
jhouse
seraphim
Joined: 11/06/2009 15:29:56
Messages: 1703
Offline
set the startTime property to something that's not in the past.
02/01/2012 11:32:06
Subject:
Re:How to add trigger without scheduling a job
Bermudo
neo
Joined: 03/05/2010 22:34:35
Messages: 7
Location: Modena, Italy; Berlin, Germany; Madrid, Spain
Offline
The cron expression by itself is correct. How are you loading the job into the scheduler?
Forum Index
->
Quartz
Go to:
Select a forum
BigMemory
Ehcache
General
Quartz
BigMemory + Hadoop
Terracotta for Web Sessions
Terracotta Platform
Terracotta Licensing
Terracotta 中文社区
Terracotta for Spring
Powered by
JForum 2.1.7
©
JForum Team