[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 
Task not running with JDBC  XML
Forum Index -> Quartz
Author Message


Joined: 10/14/2014 05:59:01
Messages: 1


I use Quartz in 2.2.1 version

If I use RamJobStore, my task running but if I use JDBC-JobStore, my database is updated (my task is add in my tables) but the tasks not running.

Do you have an idea ?

This is my code to add task :

	 SchedulerFactory schdFact = new StdSchedulerFactory("conf/quartz.properties");
 		 Scheduler sd = schdFact.getScheduler();
 		//Scheduler sd = StdSchedulerFactory.getDefaultScheduler();
          JobDetail job = newJob(AlarmJob.class).withIdentity("myJob","group1").storeDurably(true).build();
          Trigger trigger = newTrigger().withIdentity("mytrigger", "group1").withPriority(1).startNow().withSchedule(simpleSchedule().withIntervalInSeconds(5).repeatForever()).build();
          sd.scheduleJob(job, trigger);

And this is my quartz.properies file

org.quartz.scheduler.instanceName = TestScheduler
 org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
 org.quartz.threadPool.threadCount = 4
 org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true
 #specify the jobstore used
 org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
 org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
 org.quartz.jobStore.useProperties = false
 #The datasource for the jobstore that is to be used
 org.quartz.jobStore.dataSource = myDS
 #quartz table prefixes in the database
 org.quartz.jobStore.tablePrefix = qrtz_
 org.quartz.jobStore.misfireThreshold = 60000
 org.quartz.jobStore.isClustered = false
 #The details of the datasource specified previously
 org.quartz.dataSource.myDS.driver = com.mysql.jdbc.Driver
 org.quartz.dataSource.myDS.URL = jdbc:mysql://
 org.quartz.dataSource.myDS.user = root
 org.quartz.dataSource.myDS.password = password
 org.quartz.dataSource.myDS.maxConnections = 20

Forum Index -> Quartz
Go to:   
Powered by JForum 2.1.7 © JForum Team