[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Messages posted by: adahanne  XML
Profile for adahanne -> Messages posted by adahanne [94] Go to Page: Previous  1, 2, 3, 4, 5, 6, 7 Next 
Author Message
do you have a stack trace and a simple use case to demo your concern ?
hello, did you make sure you only have 1 quartz jar in your classpath ?
http://stackoverflow.com/questions/11086736/java-lang-classnotfoundexception-org-quartz-disallowconcurrentexecution/11087440#11087440
Hello,
this question has already been answered in our forum , see :
http://forums.terracotta.org/forums/posts/list/6960.page
right, I provided an example with the quartz builder API, that actually appeared in quartz 2.0 : http://quartz-scheduler.org/documentation/quartz-2.x/new-in-quartz-2
whether you can switch to a more modern version or quartz, or you can use the old style : http://quartz-scheduler.org/documentation/quartz-1.x/examples/Example5
why didnt you use :
CronTrigger trigger = newTrigger().withIdentity("trigger1", "group1") .withSchedule(cronSchedule(cronExpression).withMisfireHandlingInstructionDoNothing()).build();
to create your trigger in the first place ? You would not need all the code you wrote after.
btw, when you do your update operations on the trigger, you are working with a clone of the trigger; so you would need to re schedule your trigger after updates
Hello,
I was rather mentioning the code that creates/ initializes your cronTrigger (the code you sent just shows that you are trying to handle manually misfires; I'm pretty sure you don't need to do that)
could you attach a simple test case, to reproduce your misfire behaviour ? You could attach your java code + your quartz.properties.
Thanks
Hello,
you seem to get this error because you configured your trigger with a job that is different than the one you gave to scheduleJob().
How did you start your scheduler ?
something like this should work fine :
Code:
     // First we must get a reference to a scheduler
     SchedulerFactory sf = new StdSchedulerFactory();
     Scheduler sched = sf.getScheduler();
 
     // computer a time that is on the next round minute
     Date runTime = evenMinuteDate(new Date());
 
     // define the job and tie it to our HelloJob class
     JobDetail job = newJob(HelloJob.class).withIdentity("job1", "group1").build();
 
     // Trigger the job to run on the next round minute
     Trigger trigger = newTrigger().withIdentity("trigger1", "group1").startAt(runTime).build();
 
     // Tell quartz to schedule the job using our trigger
     sched.scheduleJob(job, trigger);
 


or even :
Code:
 / define the job and tie it to our HelloJob class
     JobDetail job = newJob(HelloJob.class).withIdentity("job1", "group1").build();
 
     // Trigger the job to run on the next round minute
     Trigger trigger = newTrigger().withIdentity("trigger1", "group1")..forJob(job).startAt(runTime).build();
 
     // Tell quartz to schedule the job using our trigger
     sched.scheduleJob(trigger);
 
Hello ,
The scenario 2, cronTrigger.setMisfireInstruction(CronTrigger.MISFIRE_INSTRUCTION_DO_NOTHING); should have been enough (the documentation states :
Code:
     /**
      * <p>
      * Instructs the <code>{@link Scheduler}</code> that upon a mis-fire
      * situation, the <code>{@link CronTrigger}</code> wants to have it's
      * next-fire-time updated to the next time in the schedule after the current
      * time (taking into account any associated <code>{@link Calendar}</code>,
      * but it does not want to be fired now.
      * </p>
      */
     public static final int MISFIRE_INSTRUCTION_DO_NOTHING = 2;
 


could you please share more details such as the initialization code/ quartz.properties / logs / quartz version , that can reproduce the problem ?
hello,
are you using quartz scheduler for java ?
if not, maybe you could try asking the quartz.net community : http://www.quartz-scheduler.net/
hello,
you are right, we can only send plain text messages (with the ability to set a content type though, such as text/html).
There is already a similar issue in jira : https://jira.terracotta.org/jira/browse/QTZ-79 ; similar in the way that it would enhance the sendmailjob.
I guess you could create a new issue (wanted feature) in jira, or update this existing one, adding a comment.
Even better, you could contribute a patch to support attachments.
Anthony
I think you could just prefix your tables with a different prefix for each scheduler quartz properties:
org.quartz.jobStore.tablePrefix: "IMPORT_QRTZ_"
and
org.quartz.jobStore.tablePrefix: "EXPORT_QRTZ_"

see http://quartz-scheduler.org/documentation/quartz-2.x/configuration/ConfigJobStoreTX
I would update the db if I were you, it should not be too difficult.
Hi,
could you please attach your quartz.properties, your initialization code (creating and starting the scheduler) and the version of quartz you are running
could you reproduce ion a non oc4j environment ?
thanks
something like this :

CronTriggerImpl trigger = new CronTriggerImpl();
trigger.setName("test");
trigger.setGroup("testGroup");
trigger.setCronExpression("0 30 13,23 1/1 * ?");
List<Date> fireTimes = TriggerUtils.computeFireTimes(trigger, null, 48);

for (Date date : fireTimes) {
//13.30 and 23.30 everyday
System.out.println(date);
}

CronTriggerImpl trigger2 = new CronTriggerImpl();
trigger2.setName("test2");
trigger2.setGroup("testGroup");
trigger2.setCronExpression("0 0 9 1/1 * ?");
List<Date> fireTimes2 = TriggerUtils.computeFireTimes(trigger2, null, 48);

for (Date date : fireTimes2) {
//9.00 everyday
System.out.println(date);
}

JobDetail job1 = newJob(HelloJob.class).withIdentity("job1", "group1").build();

SchedulerFactory sf = new StdSchedulerFactory("quartz.properties");
Scheduler sched = sf.getScheduler();

HashSet<Trigger> triggers = new HashSet<Trigger>();
triggers.add(trigger);
triggers.add(trigger2);
sched.scheduleJob(job1, triggers, true);
hello,

Now I want to access this same schedular from another java program running on same JVM  


Starting another main class will start another JVM.
You need to introduce a communication channel between your 2 VMs, for example RMI :

http://quartz-scheduler.org/documentation/quartz-2.x/configuration/ConfigRMI

or even JMX.
 
Profile for adahanne -> Messages posted by adahanne [94] Go to Page: Previous  1, 2, 3, 4, 5, 6, 7 Next 
Go to:   
Powered by JForum 2.1.7 © JForum Team