[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
hello,
this forum is dedicated to the java version of quartz scheduler.
I know in the java version, there is _scheduler.unScheduleJob( triggerKey); don't know about the .net version
Anthony
hello,
could you share the code you wrote in order to define your trigger and job ?
thanks
maybe you could try "0 55 16 ? * 5"
run your application using quartz as the specific user (using sudo or configuring the windows service ) ?
can you try with the versions used in http://svn.terracotta.org/svn/quartz/branches/quartz-2.1.x/examples/pom.xml ?
what's the version of quartz you're using ?
hello,
why don't you try to programatically configure your scheduler ?
see the StdSchedulerFactory javadoc :
* Alternatively, you can explicitly initialize the factory by calling one of
* the <code>initialize(xx)</code> methods before calling <code>getScheduler()</code>. 

You could write some code to read your properties from a properties file and then decrypt the password and call one of the initialize(xx) methods, or even directly create a new StdSchedulerFactory instance with your properties :
Code:
        properties.put("org.quartz.scheduler.instanceName","TestScheduler");
         properties.put("org.quartz.scheduler.instanceId","AUTO");
         properties.put("org.quartz.scheduler.skipUpdateCheck","true");
         properties.put("org.quartz.threadPool.class","org.quartz.simpl.SimpleThreadPool");
         properties.put("org.quartz.threadPool.threadCount","12");
         properties.put("org.quartz.threadPool.threadPriority","5");
         properties.put("org.quartz.jobStore.misfireThreshold","10000");
         properties.put("org.quartz.jobStore.class","org.quartz.impl.jdbcjobstore.JobStoreTX");
         properties.put("org.quartz.jobStore.driverDelegateClass","org.quartz.impl.jdbcjobstore.StdJDBCDelegate");
         properties.put("org.quartz.jobStore.useProperties","true");
         properties.put("org.quartz.jobStore.dataSource","myDS");
         properties.put("org.quartz.jobStore.tablePrefix","QRTZ_");
         properties.put("org.quartz.jobStore.isClustered","false");
         properties.put("org.quartz.dataSource.myDS.driver","org.apache.derby.jdbc.ClientDriver");
         properties.put("org.quartz.dataSource.myDS.URL",JdbcQuartzDerbyUtilities.DATABASE_CONNECTION_PREFIX);
         properties.put("org.quartz.dataSource.myDS.user","quartz");
         properties.put("org.quartz.dataSource.myDS.password","quartz");
         properties.put("org.quartz.dataSource.myDS.maxConnections","5");
         // we must get a reference to a scheduler
         SchedulerFactory sf = new StdSchedulerFactory(properties);
 		sched = sf.getScheduler();


Hope that helps,
Anthony
Hi,
your configuration is wrong, try this :

Code:
  # Job Store
  org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
  org.quartz.jobStore.useProperties = false
  org.quartz.jobStore.dataSource = default
  org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
   
  # Data Source
  org.quartz.dataSource.default.driver = org.postgresql.Driver
  org.quartz.dataSource.default.URL = jdbc:postgresql://localhost/cloudi
  org.quartz.dataSource.default.user = postgres
  org.quartz.dataSource.default.password = 
  org.quartz.dataSource.default.maxConnections = 10
 


making sure you have something like this in your pom (if using maven) :
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.1-901.jdbc4</version>
</dependency>
Hope that helps,
Anthony
hello,
can you please provide us with your quartz.properties settings file ? so that we can try to reproduce this error
Thanks
hi,
can you provide at least your job code ?
thanks
Hello,
using quartz 1.8.3, you should rather read this documentation :
http://quartz-scheduler.org/documentation/quartz-1.x/quick-start
Anthony
Hello,

More precisely, I'd like to define quartz properties on application specific basis (each application has its db connection user, that connection user should contain also the timer tables). I do not wat JBoss start up with a generic quartz configuration at all; applications should provide it.  


you should use one quartz.properties per application : put each quartz.properties file in each app's WEB-INF/classes folder (see http://quartz-scheduler.org/documentation/quartz-2.x/quick-start)
Hello,
I copied/pasted your code in a unit test (using seconds instead of hours in the cron expressions and using 2 different sample job classes), using those properties for quartz.properties :
Code:
 org.quartz.scheduler.instanceName: TestScheduler
 org.quartz.scheduler.instanceId: AUTO
 org.quartz.scheduler.skipUpdateCheck: true
 org.quartz.threadPool.class: org.quartz.simpl.SimpleThreadPool
 org.quartz.threadPool.threadCount: 3
 org.quartz.threadPool.threadPriority: 5
 org.quartz.jobStore.misfireThreshold: 60000
 org.quartz.jobStore.class: org.quartz.simpl.RAMJobStore
 

and I got the expected output (using quartz 2.2) (sleeping for 10 seconds right after the scheduler.triggerJob( oneHRJob.getKey() );)

Code:
 [INFO] 30 Jul 09:14:58.685 AM main [org.quartz.impl.StdSchedulerFactory]
 Quartz scheduler 'TestScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
 
 [INFO] 30 Jul 09:14:58.685 AM main [org.quartz.impl.StdSchedulerFactory]
 Quartz scheduler version: 2.2.0-SNAPSHOT
 
 Starting Scheduler
 [INFO] 30 Jul 09:14:58.700 AM main [org.quartz.core.QuartzScheduler]
 Scheduler TestScheduler_$_NON_CLUSTERED started.
 
 Scheduler started:true
 [INFO] 30 Jul 09:14:58.720 AM TestScheduler_Worker-1 [org.quartz.jobs.sample.HelloJob2]
 Hello World! - Mon Jul 30 09:14:58 EDT 2012
 
 [INFO] 30 Jul 09:14:58.721 AM TestScheduler_Worker-2 [org.quartz.jobs.sample.HelloJob2]
 Hello World! - Mon Jul 30 09:14:58 EDT 2012
 
 [INFO] 30 Jul 09:14:59.002 AM TestScheduler_Worker-3 [org.quartz.jobs.sample.HelloJob2]
 Hello World! - Mon Jul 30 09:14:59 EDT 2012
 
 [INFO] 30 Jul 09:15:00.003 AM TestScheduler_Worker-1 [org.quartz.jobs.sample.HelloJob]
 Hello World! - Mon Jul 30 09:15:00 EDT 2012
 
 [INFO] 30 Jul 09:15:00.003 AM TestScheduler_Worker-2 [org.quartz.jobs.sample.HelloJob2]
 Hello World! - Mon Jul 30 09:15:00 EDT 2012
 
 [INFO] 30 Jul 09:15:01.001 AM TestScheduler_Worker-3 [org.quartz.jobs.sample.HelloJob2]
 Hello World! - Mon Jul 30 09:15:01 EDT 2012
 
 [INFO] 30 Jul 09:15:02.001 AM TestScheduler_Worker-1 [org.quartz.jobs.sample.HelloJob2]
 Hello World! - Mon Jul 30 09:15:02 EDT 2012
 
 [INFO] 30 Jul 09:15:03.002 AM TestScheduler_Worker-2 [org.quartz.jobs.sample.HelloJob2]
 Hello World! - Mon Jul 30 09:15:03 EDT 2012
 
 [INFO] 30 Jul 09:15:04.002 AM TestScheduler_Worker-3 [org.quartz.jobs.sample.HelloJob]
 Hello World! - Mon Jul 30 09:15:04 EDT 2012
 
 [INFO] 30 Jul 09:15:04.003 AM TestScheduler_Worker-1 [org.quartz.jobs.sample.HelloJob2]
 Hello World! - Mon Jul 30 09:15:04 EDT 2012
 
 [INFO] 30 Jul 09:15:05.002 AM TestScheduler_Worker-2 [org.quartz.jobs.sample.HelloJob2]
 Hello World! - Mon Jul 30 09:15:05 EDT 2012
 
 [INFO] 30 Jul 09:15:06.001 AM TestScheduler_Worker-3 [org.quartz.jobs.sample.HelloJob2]
 Hello World! - Mon Jul 30 09:15:06 EDT 2012
 
 [INFO] 30 Jul 09:15:07.002 AM TestScheduler_Worker-1 [org.quartz.jobs.sample.HelloJob2]
 Hello World! - Mon Jul 30 09:15:07 EDT 2012
 
 [INFO] 30 Jul 09:15:08.002 AM TestScheduler_Worker-2 [org.quartz.jobs.sample.HelloJob]
 Hello World! - Mon Jul 30 09:15:08 EDT 2012
 
 [INFO] 30 Jul 09:15:08.003 AM TestScheduler_Worker-3 [org.quartz.jobs.sample.HelloJob2]
 Hello World! - Mon Jul 30 09:15:08 EDT 2012


Can you please provide us with a sample project that can reproduce your issue ?

PS : this question is also posted on StackOverflow : http://stackoverflow.com/questions/11714410/quartz-with-couple-of-jobs-but-only-one-running
Hello Jose,
do you have a log4j.xml config file on your classpath ?
Anthony

sagandhi wrote:
Where can I get help/documents that will guide me to configure clustering for quartz 1.5. 

http://quartz-scheduler.org/documentation/quartz-1.x/quick-start
 
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