Quartz1.8.5例子(四)
- /*
- * Copyright 2005 - 2009 Terracotta, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- */
- package org.quartz.examples.example4;
- import java.util.Date;
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
- import org.quartz.JobDataMap;
- import org.quartz.JobExecutionContext;
- import org.quartz.JobExecutionException;
- import org.quartz.StatefulJob;
- /**
- * <p>
- * This is just a simple job that receives parameters and
- * maintains state
- * </p>
- *
- * @author Bill Kratzer
- */
- public class ColorJob implements StatefulJob {
- private static Logger _log = LoggerFactory.getLogger(ColorJob.class);
- // parameter names specific to this job
- public static final String FAVORITE_COLOR = "favorite color";
- public static final String EXECUTION_COUNT = "count";
- // Since Quartz will re-instantiate a class every time it
- // gets executed, members non-static member variables can
- // not be used to maintain state!
- private int _counter = 1;
- /**
- * <p>
- * Empty constructor for job initilization
- * </p>
- * <p>
- * Quartz requires a public empty constructor so that the
- * scheduler can instantiate the class whenever it needs.
- * </p>
- */
- public ColorJob() {
- }
- /**
- * <p>
- * Called by the <code>{@link org.quartz.Scheduler}</code> when a
- * <code>{@link org.quartz.Trigger}</code> fires that is associated with
- * the <code>Job</code>.
- * </p>
- *
- * @throws JobExecutionException
- * if there is an exception while executing the job.
- */
- public void execute(JobExecutionContext context)
- throws JobExecutionException {
- // This job simply prints out its job name and the
- // date and time that it is running
- String jobName = context.getJobDetail().getFullName();
- // Grab and print passed parameters
- JobDataMap data = context.getJobDetail().getJobDataMap();
- String favoriteColor = data.getString(FAVORITE_COLOR);
- int count = data.getInt(EXECUTION_COUNT);
- _log.info("ColorJob: " + jobName + " executing at " + new Date() + "\n" +
- " favorite color is " + favoriteColor + "\n" +
- " execution count (from job map) is " + count + "\n" +
- " execution count (from job member variable) is " + _counter);
- // increment the count and store it back into the
- // job map so that job state can be properly maintained
- count++;
- data.put(EXECUTION_COUNT, count);
- // Increment the local member variable
- // This serves no real purpose since job state can not
- // be maintained via member variables!
- _counter++;
- }
- }
- /*
- * Copyright 2005 - 2009 Terracotta, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- */
- package org.quartz.examples.example4;
- import java.util.Date;
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
- import org.quartz.JobDetail;
- import org.quartz.Scheduler;
- import org.quartz.SchedulerFactory;
- import org.quartz.SchedulerMetaData;
- import org.quartz.SimpleTrigger;
- import org.quartz.TriggerUtils;
- import org.quartz.impl.StdSchedulerFactory;
- /**
- * This Example will demonstrate how job parameters can be
- * passed into jobs and how state can be maintained
- *
- * @author Bill Kratzer
- */
- public class JobStateExample {
- public void run() throws Exception {
- Logger log = LoggerFactory.getLogger(JobStateExample.class);
- log.info("------- Initializing -------------------");
- // First we must get a reference to a scheduler
- SchedulerFactory sf = new StdSchedulerFactory();
- Scheduler sched = sf.getScheduler();
- log.info("------- Initialization Complete --------");
- log.info("------- Scheduling Jobs ----------------");
- // get a "nice round" time a few seconds in the future....
- long ts = TriggerUtils.getNextGivenSecondDate(null, 10).getTime();
- // job1 will only run 5 times, every 10 seconds
- JobDetail job1 = new JobDetail("job1", "group1", ColorJob.class);
- SimpleTrigger trigger1 = new SimpleTrigger("trigger1", "group1", "job1", "group1",
- new Date(ts), null, 4, 10000);
- // pass initialization parameters into the job
- job1.getJobDataMap().put(ColorJob.FAVORITE_COLOR, "Green");
- job1.getJobDataMap().put(ColorJob.EXECUTION_COUNT, 1);
- // schedule the job to run
- Date scheduleTime1 = sched.scheduleJob(job1, trigger1);
- log.info(job1.getFullName() +
- " will run at: " + scheduleTime1 +
- " and repeat: " + trigger1.getRepeatCount() +
- " times, every " + trigger1.getRepeatInterval() / 1000 + " seconds");
- // job2 will also run 5 times, every 10 seconds
- JobDetail job2 = new JobDetail("job2", "group1", ColorJob.class);
- SimpleTrigger trigger2 = new SimpleTrigger("trigger2", "group1", "job2", "group1",
- new Date(ts + 1000), null, 4, 10000);
- // pass initialization parameters into the job
- // this job has a different favorite color!
- job2.getJobDataMap().put(ColorJob.FAVORITE_COLOR, "Red");
- job2.getJobDataMap().put(ColorJob.EXECUTION_COUNT, 1);
- // schedule the job to run
- Date scheduleTime2 = sched.scheduleJob(job2, trigger2);
- log.info(job2.getFullName() +
- " will run at: " + scheduleTime2 +
- " and repeat: " + trigger2.getRepeatCount() +
- " times, every " + trigger2.getRepeatInterval() / 1000 + " seconds");
- log.info("------- Starting Scheduler ----------------");
- // All of the jobs have been added to the scheduler, but none of the jobs
- // will run until the scheduler has been started
- sched.start();
- log.info("------- Started Scheduler -----------------");
- log.info("------- Waiting 60 seconds... -------------");
- try {
- // wait five minutes to show jobs
- Thread.sleep(60L * 1000L);
- // executing...
- } catch (Exception e) {
- }
- log.info("------- Shutting Down ---------------------");
- sched.shutdown(true);
- log.info("------- Shutdown Complete -----------------");
- SchedulerMetaData metaData = sched.getMetaData();
- log.info("Executed " + metaData.getNumberOfJobsExecuted() + " jobs.");
- }
- public static void main(String[] args) throws Exception {
- JobStateExample example = new JobStateExample();
- example.run();
- }
- }
- /*
- * Copyright 2005 - 2009 Terracotta, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy
- * of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- */
- package org.quartz.examples.example4;
- import java.util.Date;
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
- import org.quartz.JobDetail;
- import org.quartz.Scheduler;
- import org.quartz.SchedulerFactory;
- import org.quartz.SchedulerMetaData;
- import org.quartz.SimpleTrigger;
- import org.quartz.TriggerUtils;
- import org.quartz.impl.StdSchedulerFactory;
- /**
- * This Example will demonstrate how job parameters can be
- * passed into jobs and how state can be maintained
- *
- * @author Bill Kratzer
- */
- public class JobStateExample {
- public void run() throws Exception {
- Logger log = LoggerFactory.getLogger(JobStateExample.class);
- log.info("------- Initializing -------------------");
- // First we must get a reference to a scheduler
- SchedulerFactory sf = new StdSchedulerFactory();
- Scheduler sched = sf.getScheduler();
- log.info("------- Initialization Complete --------");
- log.info("------- Scheduling Jobs ----------------");
- // get a "nice round" time a few seconds in the future....
- long ts = TriggerUtils.getNextGivenSecondDate(null, 10).getTime();
- // job1 will only run 5 times, every 10 seconds
- JobDetail job1 = new JobDetail("job1", "group1", ColorJob.class);
- SimpleTrigger trigger1 = new SimpleTrigger("trigger1", "group1", "job1", "group1",
- new Date(ts), null, 4, 10000);
- // pass initialization parameters into the job
- job1.getJobDataMap().put(ColorJob.FAVORITE_COLOR, "Green");
- job1.getJobDataMap().put(ColorJob.EXECUTION_COUNT, 1);
- // schedule the job to run
- Date scheduleTime1 = sched.scheduleJob(job1, trigger1);
- log.info(job1.getFullName() +
- " will run at: " + scheduleTime1 +
- " and repeat: " + trigger1.getRepeatCount() +
- " times, every " + trigger1.getRepeatInterval() / 1000 + " seconds");
- // job2 will also run 5 times, every 10 seconds
- JobDetail job2 = new JobDetail("job2", "group1", ColorJob.class);
- SimpleTrigger trigger2 = new SimpleTrigger("trigger2", "group1", "job2", "group1",
- new Date(ts + 1000), null, 4, 10000);
- // pass initialization parameters into the job
- // this job has a different favorite color!
- job2.getJobDataMap().put(ColorJob.FAVORITE_COLOR, "Red");
- job2.getJobDataMap().put(ColorJob.EXECUTION_COUNT, 1);
- // schedule the job to run
- Date scheduleTime2 = sched.scheduleJob(job2, trigger2);
- log.info(job2.getFullName() +
- " will run at: " + scheduleTime2 +
- " and repeat: " + trigger2.getRepeatCount() +
- " times, every " + trigger2.getRepeatInterval() / 1000 + " seconds");
- log.info("------- Starting Scheduler ----------------");
- // All of the jobs have been added to the scheduler, but none of the jobs
- // will run until the scheduler has been started
- sched.start();
- log.info("------- Started Scheduler -----------------");
- log.info("------- Waiting 60 seconds... -------------");
- try {
- // wait five minutes to show jobs
- Thread.sleep(60L * 1000L);
- // executing...
- } catch (Exception e) {
- }
- log.info("------- Shutting Down ---------------------");
- sched.shutdown(true);
- log.info("------- Shutdown Complete -----------------");
- SchedulerMetaData metaData = sched.getMetaData();
- log.info("Executed " + metaData.getNumberOfJobsExecuted() + " jobs.");
- }
- public static void main(String[] args) throws Exception {
- JobStateExample example = new JobStateExample();
- example.run();
- }
- }
- [INFO] 02 二月 01:49:30.844 下午 main [org.quartz.examples.example4.JobStateExample]
- ------- Initializing -------------------
- [INFO] 02 二月 01:49:30.868 下午 main [org.quartz.simpl.SimpleThreadPool]
- Job execution threads will use class loader of thread: main
- [INFO] 02 二月 01:49:30.881 下午 main [org.quartz.core.SchedulerSignalerImpl]
- Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
- [INFO] 02 二月 01:49:30.882 下午 main [org.quartz.core.QuartzScheduler]
- Quartz Scheduler v.1.8.5 created.
- [INFO] 02 二月 01:49:30.884 下午 main [org.quartz.simpl.RAMJobStore]
- RAMJobStore initialized.
- [INFO] 02 二月 01:49:30.884 下午 main [org.quartz.core.QuartzScheduler]
- Scheduler meta-data: Quartz Scheduler (v1.8.5) 'DefaultQuartzScheduler' with instanceId 'NON_CLUSTERED'
- Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
- NOT STARTED.
- Currently in standby mode.
- Number of jobs executed: 0
- Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
- Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.
- [INFO] 02 二月 01:49:30.884 下午 main [org.quartz.impl.StdSchedulerFactory]
- Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
- [INFO] 02 二月 01:49:30.885 下午 main [org.quartz.impl.StdSchedulerFactory]
- Quartz scheduler version: 1.8.5
- [INFO] 02 二月 01:49:30.885 下午 main [org.quartz.examples.example4.JobStateExample]
- ------- Initialization Complete --------
- [INFO] 02 二月 01:49:30.885 下午 main [org.quartz.examples.example4.JobStateExample]
- ------- Scheduling Jobs ----------------
- [INFO] 02 二月 01:49:30.890 下午 main [org.quartz.examples.example4.JobStateExample]
- group1.job1 will run at: Tue Feb 02 13:49:40 CST 2016 and repeat: 4 times, every 10 seconds
- [INFO] 02 二月 01:49:30.890 下午 main [org.quartz.examples.example4.JobStateExample]
- group1.job2 will run at: Tue Feb 02 13:49:41 CST 2016 and repeat: 4 times, every 10 seconds
- [INFO] 02 二月 01:49:30.891 下午 main [org.quartz.examples.example4.JobStateExample]
- ------- Starting Scheduler ----------------
- [INFO] 02 二月 01:49:30.891 下午 main [org.quartz.core.QuartzScheduler]
- Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
- [INFO] 02 二月 01:49:30.891 下午 main [org.quartz.examples.example4.JobStateExample]
- ------- Started Scheduler -----------------
- [INFO] 02 二月 01:49:30.891 下午 main [org.quartz.examples.example4.JobStateExample]
- ------- Waiting 60 seconds... -------------
- [DEBUG] 02 二月 01:49:31.885 下午 Timer-0 [org.quartz.utils.UpdateChecker]
- Checking for available updated version of Quartz...
- [DEBUG] 02 二月 01:49:40.008 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
- Producing instance of Job 'group1.job1', class=org.quartz.examples.example4.ColorJob
- [DEBUG] 02 二月 01:49:40.026 下午 DefaultQuartzScheduler_Worker-1 [org.quartz.core.JobRunShell]
- Calling execute on job group1.job1
- [INFO] 02 二月 01:49:40.026 下午 DefaultQuartzScheduler_Worker-1 [org.quartz.examples.example4.ColorJob]
- ColorJob: group1.job1 executing at Tue Feb 02 13:49:40 CST 2016
- favorite color is Green
- execution count (from job map) is 1
- execution count (from job member variable) is 1
- [DEBUG] 02 二月 01:49:41.001 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
- Producing instance of Job 'group1.job2', class=org.quartz.examples.example4.ColorJob
- [DEBUG] 02 二月 01:49:41.002 下午 DefaultQuartzScheduler_Worker-2 [org.quartz.core.JobRunShell]
- Calling execute on job group1.job2
- [INFO] 02 二月 01:49:41.002 下午 DefaultQuartzScheduler_Worker-2 [org.quartz.examples.example4.ColorJob]
- ColorJob: group1.job2 executing at Tue Feb 02 13:49:41 CST 2016
- favorite color is Red
- execution count (from job map) is 1
- execution count (from job member variable) is 1
- [DEBUG] 02 二月 01:49:50.000 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
- Producing instance of Job 'group1.job1', class=org.quartz.examples.example4.ColorJob
- [DEBUG] 02 二月 01:49:50.000 下午 DefaultQuartzScheduler_Worker-3 [org.quartz.core.JobRunShell]
- Calling execute on job group1.job1
- [INFO] 02 二月 01:49:50.001 下午 DefaultQuartzScheduler_Worker-3 [org.quartz.examples.example4.ColorJob]
- ColorJob: group1.job1 executing at Tue Feb 02 13:49:50 CST 2016
- favorite color is Green
- execution count (from job map) is 2
- execution count (from job member variable) is 1
- [DEBUG] 02 二月 01:49:51.001 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
- Producing instance of Job 'group1.job2', class=org.quartz.examples.example4.ColorJob
- [DEBUG] 02 二月 01:49:51.002 下午 DefaultQuartzScheduler_Worker-4 [org.quartz.core.JobRunShell]
- Calling execute on job group1.job2
- [INFO] 02 二月 01:49:51.002 下午 DefaultQuartzScheduler_Worker-4 [org.quartz.examples.example4.ColorJob]
- ColorJob: group1.job2 executing at Tue Feb 02 13:49:51 CST 2016
- favorite color is Red
- execution count (from job map) is 2
- execution count (from job member variable) is 1
- [DEBUG] 02 二月 01:50:00.000 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
- Producing instance of Job 'group1.job1', class=org.quartz.examples.example4.ColorJob
- [DEBUG] 02 二月 01:50:00.001 下午 DefaultQuartzScheduler_Worker-5 [org.quartz.core.JobRunShell]
- Calling execute on job group1.job1
- [INFO] 02 二月 01:50:00.001 下午 DefaultQuartzScheduler_Worker-5 [org.quartz.examples.example4.ColorJob]
- ColorJob: group1.job1 executing at Tue Feb 02 13:50:00 CST 2016
- favorite color is Green
- execution count (from job map) is 3
- execution count (from job member variable) is 1
- [DEBUG] 02 二月 01:50:01.000 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
- Producing instance of Job 'group1.job2', class=org.quartz.examples.example4.ColorJob
- [DEBUG] 02 二月 01:50:01.000 下午 DefaultQuartzScheduler_Worker-6 [org.quartz.core.JobRunShell]
- Calling execute on job group1.job2
- [INFO] 02 二月 01:50:01.001 下午 DefaultQuartzScheduler_Worker-6 [org.quartz.examples.example4.ColorJob]
- ColorJob: group1.job2 executing at Tue Feb 02 13:50:01 CST 2016
- favorite color is Red
- execution count (from job map) is 3
- execution count (from job member variable) is 1
- [DEBUG] 02 二月 01:50:10.001 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
- Producing instance of Job 'group1.job1', class=org.quartz.examples.example4.ColorJob
- [DEBUG] 02 二月 01:50:10.001 下午 DefaultQuartzScheduler_Worker-7 [org.quartz.core.JobRunShell]
- Calling execute on job group1.job1
- [INFO] 02 二月 01:50:10.001 下午 DefaultQuartzScheduler_Worker-7 [org.quartz.examples.example4.ColorJob]
- ColorJob: group1.job1 executing at Tue Feb 02 13:50:10 CST 2016
- favorite color is Green
- execution count (from job map) is 4
- execution count (from job member variable) is 1
- [DEBUG] 02 二月 01:50:11.001 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
- Producing instance of Job 'group1.job2', class=org.quartz.examples.example4.ColorJob
- [DEBUG] 02 二月 01:50:11.002 下午 DefaultQuartzScheduler_Worker-8 [org.quartz.core.JobRunShell]
- Calling execute on job group1.job2
- [INFO] 02 二月 01:50:11.002 下午 DefaultQuartzScheduler_Worker-8 [org.quartz.examples.example4.ColorJob]
- ColorJob: group1.job2 executing at Tue Feb 02 13:50:11 CST 2016
- favorite color is Red
- execution count (from job map) is 4
- execution count (from job member variable) is 1
- [DEBUG] 02 二月 01:50:20.000 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
- Producing instance of Job 'group1.job1', class=org.quartz.examples.example4.ColorJob
- [DEBUG] 02 二月 01:50:20.000 下午 DefaultQuartzScheduler_Worker-9 [org.quartz.core.JobRunShell]
- Calling execute on job group1.job1
- [INFO] 02 二月 01:50:20.001 下午 DefaultQuartzScheduler_Worker-9 [org.quartz.examples.example4.ColorJob]
- ColorJob: group1.job1 executing at Tue Feb 02 13:50:20 CST 2016
- favorite color is Green
- execution count (from job map) is 5
- execution count (from job member variable) is 1
- [DEBUG] 02 二月 01:50:21.001 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
- Producing instance of Job 'group1.job2', class=org.quartz.examples.example4.ColorJob
- [DEBUG] 02 二月 01:50:21.002 下午 DefaultQuartzScheduler_Worker-10 [org.quartz.core.JobRunShell]
- Calling execute on job group1.job2
- [INFO] 02 二月 01:50:21.002 下午 DefaultQuartzScheduler_Worker-10 [org.quartz.examples.example4.ColorJob]
- ColorJob: group1.job2 executing at Tue Feb 02 13:50:21 CST 2016
- favorite color is Red
- execution count (from job map) is 5
- execution count (from job member variable) is 1
- [INFO] 02 二月 01:50:30.905 下午 main [org.quartz.examples.example4.JobStateExample]
- ------- Shutting Down ---------------------
- [INFO] 02 二月 01:50:30.906 下午 main [org.quartz.core.QuartzScheduler]
- Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED shutting down.
- [INFO] 02 二月 01:50:30.906 下午 main [org.quartz.core.QuartzScheduler]
- Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED paused.
- [DEBUG] 02 二月 01:50:30.907 下午 main [org.quartz.simpl.SimpleThreadPool]
- shutdown complete
- [INFO] 02 二月 01:50:30.908 下午 main [org.quartz.core.QuartzScheduler]
- Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED shutdown complete.
- [INFO] 02 二月 01:50:30.908 下午 main [org.quartz.examples.example4.JobStateExample]
- ------- Shutdown Complete -----------------
- [INFO] 02 二月 01:50:30.909 下午 main [org.quartz.examples.example4.JobStateExample]
- Executed 10 jobs.
- [DEBUG] 02 二月 01:50:31.029 下午 DefaultQuartzScheduler_Worker-10 [org.quartz.simpl.SimpleThreadPool]
- WorkerThread is shut down.
- [DEBUG] 02 二月 01:50:31.029 下午 DefaultQuartzScheduler_Worker-9 [org.quartz.simpl.SimpleThreadPool]
- WorkerThread is shut down.
- [DEBUG] 02 二月 01:50:31.093 下午 DefaultQuartzScheduler_Worker-7 [org.quartz.simpl.SimpleThreadPool]
- WorkerThread is shut down.
- [DEBUG] 02 二月 01:50:31.093 下午 DefaultQuartzScheduler_Worker-8 [org.quartz.simpl.SimpleThreadPool]
- WorkerThread is shut down.
- [DEBUG] 02 二月 01:50:31.179 下午 DefaultQuartzScheduler_Worker-6 [org.quartz.simpl.SimpleThreadPool]
- WorkerThread is shut down.
- [DEBUG] 02 二月 01:50:31.179 下午 DefaultQuartzScheduler_Worker-5 [org.quartz.simpl.SimpleThreadPool]
- WorkerThread is shut down.
- [DEBUG] 02 二月 01:50:31.240 下午 DefaultQuartzScheduler_Worker-3 [org.quartz.simpl.SimpleThreadPool]
- WorkerThread is shut down.
- [DEBUG] 02 二月 01:50:31.258 下午 DefaultQuartzScheduler_Worker-4 [org.quartz.simpl.SimpleThreadPool]
- WorkerThread is shut down.
- [DEBUG] 02 二月 01:50:31.295 下午 DefaultQuartzScheduler_Worker-2 [org.quartz.simpl.SimpleThreadPool]
- WorkerThread is shut down.
- [DEBUG] 02 二月 01:50:31.339 下午 DefaultQuartzScheduler_Worker-1 [org.quartz.simpl.SimpleThreadPool]
- WorkerThread is shut down.
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
- <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
- <appender name="default" class="org.apache.log4j.ConsoleAppender">
- <param name="target" value="System.out"/>
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="[%p] %d{dd MMM hh:mm:ss.SSS aa} %t [%c]%n%m%n%n"/>
- </layout>
- </appender>
- <logger name="org.quartz">
- <level value="debug" />
- </logger>
- <root>
- <level value="debug" />
- <appender-ref ref="default" />
- </root>
- </log4j:configuration>
Quartz1.8.5例子(四)的更多相关文章
- Quartz1.8.5例子(十四)
org.quartz.scheduler.instanceName: PriorityExampleScheduler # Set thread count to 1 to force Trigger ...
- scrapy-splash抓取动态数据例子四
一.介绍 本例子用scrapy-splash抓取微众圈网站给定关键字抓取咨询信息. 给定关键字:打通:融合:电视 抓取信息内如下: 1.资讯标题 2.资讯链接 3.资讯时间 4.资讯来源 二.网站信息 ...
- Quartz1.8.5例子(二)
/* * Copyright 2005 - 2009 Terracotta, Inc. * * Licensed under the Apache License, Version 2.0 (the ...
- 从零开始学习Node.js例子四 多页面实现数学运算 续二(client端和server端)
1.server端 支持数学运算的服务器,服务器的返回结果用json对象表示. math-server.js //通过监听3000端口使其作为Math Wizard的后台程序 var math = r ...
- 从零开始学习Node.js例子四 多页面实现数学运算 续一(使用connect和express框架)
1.使用connect框架 .use方法用于绑定中间件到connect服务器,它会配置一系列在接到请求时调用的中间件模块,此例中我们要配置的中间件有favicon logger static rout ...
- 从零开始学习Node.js例子四 多页面实现数学运算
app-node.js ; var http = require('http'); var htutil = require('./htutil'); var server = http.create ...
- Quartz1.8.5例子(十一)
/* * Copyright 2005 - 2009 Terracotta, Inc. * * Licensed under the Apache License, Version 2.0 (the ...
- Quartz1.8.5例子(十)
/* * Copyright 2005 - 2009 Terracotta, Inc. * * Licensed under the Apache License, Version 2.0 (the ...
- Quartz1.8.5例子(九)
/* * Copyright 2005 - 2009 Terracotta, Inc. * * Licensed under the Apache License, Version 2.0 (the ...
随机推荐
- mysql 加载文本数据
可以配置导入哪几列,每个字段用什么隔开,每行用什么隔开,也可以单独设置某个字段的值. 详细看代码: LOAD DATA INFILE 'D:/aa.txt' INTO TABLE aa FIELDS ...
- C语言 小游戏之贪吃蛇
还记得非常久曾经听群里人说做贪吃蛇什么的,那时候大一刚学了C语言,认为非常难,根本没什么思路. 前不久群里有些人又在谈论C语言贪吃蛇的事了,看着他们在做,我也打算做一个出来. 如今大三,经过了这一年半 ...
- [Webpack 2] Validate your Webpack config with webpack-validator
It’s quite common to make a mistake while developing your webpack configuration. A simple typo can c ...
- [TypeScript] Configuring a New TypeScript Project
This lesson walks you through creating your first .tsconfig configuration file which will tell the T ...
- Java中NaN和-0.0f的比较问题
简单的说,比较两个int型或long型的数据没有什么问题,可以用==来判断,但对浮点数(float与double)来说,需要对Float.NaN和0.0这个两个特殊数字作额外的处理.Float.NaN ...
- vlist java实现-转
转自:http://www.blogjava.net/changedi/archive/2012/04/15/374226.html vlist是一种列表的实现.结构如下图: (图来源wikipedi ...
- 理解FTP协议
为了防止无良网站的爬虫抓取文章,特此标识,转载请注明文章出处.LaplaceDemon/ShiJiaqi. http://www.cnblogs.com/shijiaqi1066/p/5186117. ...
- C# QRCode、DataMatrix和其他条形码的生成和解码软件
今天制造了一个C#的软件,具体是用于生成二维码和条形码的,包括常用的QRCode.DataMatrix.Code128.EAN-8等等. 使用的第三方类库是Zxing.net和DataMatrix.n ...
- MyTask4
最近稍微做了点修改,把几处bug修复了下,另外新增了授权码功能和数据缓冲功能 先看看效果图 1. 如果要把软件做的高大上一些,你可以加一个授权验证,授权码以字符串形式存放在程序里面,当然你也可以另外开 ...
- html语言中的meta元素
1.定义语言 格式:〈meta http-equiv=″Content-Type″ content=″text/html; charset=gb2312″〉 这是META最常见的用法,在制作网页时 ...