quartz-scheduler

How to migrate from RAMJobStore to JobStoreCMT for persisted Quartz jobs in Seam

纵然是瞬间 提交于 2019-12-10 10:45:29
问题 I am trying to get a simple example of the Quartz scheduler working in JBoss Seam 2.2.0.GA. Everything works fine using the RAMJobStore setting, but changing the store from org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore to org.quartz.jobStore.class org.quartz.impl.jdbcjobstore.JobStoreCMT org.quartz.jobStore.driverDelegateClass org.quartz.impl.jdbcjobstore.PostgreSQLDelegate org.quartz.jobStore.useProperties false org.quartz.jobStore.dataSource quartzDatasource ## FIXME Should be a

Grails - Parameter in a Quartz job Trigger

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 10:14:10
问题 I have the following quartz job, set via Quartz-plugin: class UserMonthlyNotificationJob { static triggers = { cron name:'dailyTrigger', cronExpression: " ... " cron name:'weeklyTrigger', cronExpression: " ... " cron name:'monthlyTrigger', cronExpression: " ... " } def execute(){ ... } } I would like to be able to set a parameter in the trigger that would be available in the execute block. It seems I can not set any variable in a cron trigger , and a custom trigger require to implement the

How to configure Quartz triggers in Grails to allow different schedules for testing and production

白昼怎懂夜的黑 提交于 2019-12-10 09:53:40
问题 I am trying to adopt the Quartz plugin (:quartz:1.0.1) in Grails 2.2.4 and am trying to figure out how to allow development and testing to use a different schedule than what is desired in production without having to change the code deployed to each. Here is my experience. I am using a JDBC JobStore and the Quartz Monitor plugin (:quartz-monitor:1.0) too. So I have a job defined like this: class TestJob { static triggers = { cron name: 'testTrigger', startDelay: 1000, cronExpression: '0 0/1 *

Is there any way to gain access to an HttpContext object in a Quartz.NET job?

左心房为你撑大大i 提交于 2019-12-10 08:34:32
问题 Is there any way to gain access to the HttpContext object from a Quartz.NET job? HttpContext.Current and the likes do not seem to work with Quartz.NET jobs. 回答1: Yes there is a way. Just set HttpContext.Current to JobDataMap when instantiating new scheduler(probably in Application_Start event in Global.asax) like this: jobDetail.JobDataMap["context"] = HttpContext.Current; Then access it in Execute method like this: HttpContext context = context.JobDetail.JobDataMap["context"] as HttpContext;

Cron expression to run job twice a day at different time?

筅森魡賤 提交于 2019-12-10 03:06:06
问题 I have one job that needs to be execute twice a day at different time . e.g. 10:00 and 15:30. How can i achieve this ? I am confuse because minute is different for both the time. For 11:00 and 15:00 its easy because for both the times, minute portion is same, but for the different minute portion is it feasible with cron ? Thanks in Advance and apologies for silly question. 回答1: Try following which you will get closest in one expression 0 0 10,15/12 * * ? this will run 10:00 and 15:00. 回答2:

Tomcat: OutOfMemoryError Permgen Space

元气小坏坏 提交于 2019-12-10 00:06:36
问题 I am developing a JSP application using Tomcat 6. Since I did add Quartz Scheduler Framework and Log4J library to project, Tomcat start throwing this exception when redeploying. I have readed about the problem causes, and now I know that have to be with the class loader. So, I guess the problem can be caused by the logger library that load some classes automatically. How can I deal with this problem? There is alternative way to setup the logger without using the log4j.properties file to

Quartz scheduler and OSGI

核能气质少年 提交于 2019-12-09 21:59:18
问题 I have an OSGI scheduler bundle that has the Quartz Scheduler Jar in it. This bundle exposes just an application interface to other bundles and, when a new job is registered, it is wrapped into a temporaryJob (that implements StatefulJob) and scheduled using the scheduler. In this way I don't have to expose Quartz Scheduler jar (that it is not so much osgi compliant). The problem with this approach is that, since StatefulJob avoids to execute job in parallel and I have only one actual job

Time triggered job Cron or Quartz?

风格不统一 提交于 2019-12-09 15:59:21
问题 I already asked a separate question on how to create time triggered event in Java. I was introduced to Quartz. At the same time, I also google it online, and people are saying cron in Unix is a neat solution. Which one is better? What's the cons and pros? Some specification of the system: * Unix OS * program written in Java * I have a task queue with 1000+ entries, for each timestamp, up to 500 tasks might be triggered. 回答1: Using cron seems to add another entry point into your application,

How to wire a Quartz Scheduler into my Spring context?

给你一囗甜甜゛ 提交于 2019-12-09 15:25:21
问题 I have an application in which I want to use a Quartz Scheduler object. I've read the Spring documentation regarding this and they suggest to use a SchedulerFactoryBean like this: <bean id="schedulerFactoryBean" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> <property name="autoStartup"> <value>true</value> </property> <property name="configLocation" value="classpath:quartz.properties" /> </bean> The config looks like this: org.quartz.scheduler.skipUpdateCheck = true org

Any relation between Quartz API and Joda Time API?

点点圈 提交于 2019-12-09 09:45:04
问题 Is it possible to create a date in JodaTime and then make Quartz schedule the job using the JodaTime object? Can we give a Period jodaPeriod to Quartz API in order to run a task for a particular period in a day? Are the two APIs related and/or compatible in any way? 回答1: The AxonFramework has a QuartzEventScheduler which looks like it does what you want. Here's the downlaod page and it's under the Apache 2.0 license. 回答2: Quartz provides a pretty comprehensive API that you could extend anyway