[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
thanks.
which JDK version are you using ? 1.4, 5.0, 6.0 ?
hello, can you please send the log of your application and attach your quartz.properties ?
thanks
the job data map is stored in a blob
yes there is some data (I can see several bytes are stored)
no I can not browse and read it with a sql client, since it is a blob
could you please send your app. logs + the result of scheduler.getMetaData() so that I can check your configuration ?
Thanks
you are right, I did not pay attention to the fact that you already tied your job to your trigger using the trigger builder.
this is what I have working :
Code:
 		SchedulerFactory sf = new StdSchedulerFactory();
 		Scheduler sched = sf.getScheduler();
 		LOG.info("------- Initializing ----------------------");
 
 
 		LOG.info("------- Initialization Complete -----------");
 
 		LOG.info("------- Scheduling Job  -------------------");
 
 		JobDataMap jobDataMap = new JobDataMap();
 		jobDataMap.put("ScriptName", "example") ;
 		
 		JobDetail jobDetail = newJob(HelloJob.class)
 				.withIdentity("job1", "group1")
 				.storeDurably(true)
 				.build();
 		sched.addJob(jobDetail, true);
 		CronTrigger trigger = newTrigger()
 				.withIdentity ("TestJob" + "Trigger", "DEFAULT_GROUP")
 				.startNow()
 				.withSchedule (CronScheduleBuilder.cronSchedule("* * * * * ?"))
 				.usingJobData(jobDataMap)
 				.forJob ("job1", "group1")
 				.build(); 
 		sched.scheduleJob(trigger);
 		
 		// Start up the scheduler (nothing can actually run until the
 		// scheduler has been started)
 		sched.start();
 
 		LOG.info("------- Scheduler Started -----------------");
 
 		// wait long enough so that the scheduler as an opportunity to
 		// run the job!
 		try {
 			Thread.sleep(10L * 1000L);
 		} catch (Exception e) {
 			e.printStackTrace();
 		}
 


the job being :

Code:
 public void execute(JobExecutionContext context)
         throws JobExecutionException {
 
         // Say Hello to the World and display the date/time
         _log.info("Hello World! - " + new Date());
         
         JobDataMap jobDataMapTrigger = context.getTrigger().getJobDataMap();
         System.out.println("trigger : "+(jobDataMapTrigger.isEmpty()  ? "is empty" : jobDataMapTrigger.getString("ScriptName")));
         
     }
 

and the output :
Code:
 [INFO] 30 Apr 03:14:43.008 PM TestScheduler_Worker-9 [org.quartz.jobs.sample.HelloJob]
 Hello World! - Mon Apr 30 15:14:43 EDT 2012
 
 trigger : example
 [INFO] 30 Apr 03:14:44.009 PM TestScheduler_Worker-10 [org.quartz.jobs.sample.HelloJob]
 Hello World! - Mon Apr 30 15:14:44 EDT 2012
 
 trigger : example
 [INFO] 30 Apr 03:14:45.008 PM TestScheduler_Worker-11 [org.quartz.jobs.sample.HelloJob]
 Hello World! - Mon Apr 30 15:14:45 EDT 2012
 
 trigger : example
 


I am using the derby server database, basically I configured my example using this example :
http://svn.terracotta.org/svn/quartz/branches/quartz-2.1.x/quartz-integration-tests/src/test/java/org/quartz/integrations/tests/QTZ283_IgnoreMisfirePolicyJdbcStore_Test.java

Hope that helps
Hello,
everything is fine with your example, except when you scheduled your trigger, you did not attach your job to it :
Code:
scheduler.scheduleJob(trigger); 

instead, you should write :
Code:
scheduler.scheduleJob(jobDetail,trigger); 

or, to answer your other, question, you could do this in 2 steps :
Code:
scheduler.scheduleJob(trigger);
 scheduler.add(jobDetail, true); 

provided your job is durable (see this issue to learn more about it : https://jira.terracotta.org/jira/browse/QTZ-275)
In your case, i would recommend to use the 1st form; I tested it locally, and the column got filled and the jobdatamap retrieved from the job
hello,
not sure to understand you ...
are looking for the following pattern :
Friday week1, then
Monday week3, then
Wednesday week5 , etc...

I would then suggest you to implement your own trigger... ?
Hello Reynald,
a REST API layer is scheduled (!) for later this year, I invite you to follow the quartz-dev mailing list for further information.
http://lists.terracotta.org/pipermail/quartz-dev/2012-April/000172.html
if you look at the QuartzScheduler.ExecutingJobsManager class (which is a job listener that observes the currently running jobs), you will notice that we put jobs to be executed into executingJobs and we remove jobs that got executed from this same list.
So, to answer your question, getCurrentlyExecutingJobs() returns the jobs that are about to be executed
Hello,
not so sure to understand your question here, but are you referring to the XMLSchedulingDataProcessorPlugin to load your jobs through xml ?
if this is the case, you can have a look at the examples projects, http://svn.terracotta.org/svn/quartz/branches/quartz-2.2.x/examples/ in particularly at the example10 project

Also, if you try to define a job launching native commands (a.sh), did you look at the class NativeJob ?
register from this page :
http://terracotta.org/account

it will work
hello,
did you try to create a jira account form : https://jira.terracotta.org/jira/browse/EHCWEB ?
because I could successfully re use a jira account I already created for plain ehcache jira.
please provide more details.
thanks
Hello,
Did you try looking a the documented class ?
http://svn.terracotta.org/svn/quartz/branches/quartz-2.2.x/quartz-backward-compat/src/main/java/org/quartz/NthIncludedDayTrigger.java

and also its unit test, that provides you with some other examples :
http://svn.terracotta.org/svn/quartz/branches/quartz-2.2.x/quartz-backward-compat/src/test/java/org/quartz/NthIncludedDayTriggerTest.java
Hope that helps,
I have fixed the issue in branch http://svn.terracotta.org/svn/quartz/branches/quartz-2.2.x/ , please feel free to test using a custom classloader for both the scheduler and your plugin, in case of problems, please re open https://jira.terracotta.org/jira/browse/QTZ-225
Thanks
I' m confused ...
Are you trying to run a Junit Test case or are you deploying a servlet making calls to Quartz on Tomcat ?
Because I see some Tomcat logs in your logs, and you gave us a Junit Test class code ...
 
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