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.example3; import java.util.Date; import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException; /**
* <p>
* This is just a simple job that gets fired off many times by example 1
* </p>
*
* @author Bill Kratzer
*/
public class SimpleJob implements Job { private static Logger _log = LoggerFactory.getLogger(SimpleJob.class); /**
* Quartz requires a public empty constructor so that the
* scheduler can instantiate the class whenever it needs.
*/
public SimpleJob() {
} /**
* <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();
_log.info("SimpleJob says: " + jobName + " executing at " + new Date());
} }
/*
* 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.example3; import java.util.Date; import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.quartz.CronTrigger;
import org.quartz.JobDetail;
import org.quartz.Scheduler;
import org.quartz.SchedulerFactory;
import org.quartz.SchedulerMetaData;
import org.quartz.impl.StdSchedulerFactory; /**
* This Example will demonstrate all of the basics of scheduling capabilities of
* Quartz using Cron Triggers.
*
* @author Bill Kratzer
*/
public class CronTriggerExample { public void run() throws Exception {
Logger log = LoggerFactory.getLogger(CronTriggerExample.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 ----------------"); // jobs can be scheduled before sched.start() has been called // job 1 will run every 20 seconds
JobDetail job = new JobDetail("job1", "group1", SimpleJob.class);
CronTrigger trigger = new CronTrigger("trigger1", "group1", "job1",
"group1", "0/20 * * * * ?");
sched.addJob(job, true);
Date ft = sched.scheduleJob(trigger);
log.info(job.getFullName() + " has been scheduled to run at: " + ft
+ " and repeat based on expression: "
+ trigger.getCronExpression()); // job 2 will run every other minute (at 15 seconds past the minute)
job = new JobDetail("job2", "group1", SimpleJob.class);
trigger = new CronTrigger("trigger2", "group1", "job2", "group1",
"15 0/2 * * * ?");
sched.addJob(job, true);
ft = sched.scheduleJob(trigger);
log.info(job.getFullName() + " has been scheduled to run at: " + ft
+ " and repeat based on expression: "
+ trigger.getCronExpression()); // job 3 will run every other minute but only between 8am and 5pm
job = new JobDetail("job3", "group1", SimpleJob.class);
trigger = new CronTrigger("trigger3", "group1", "job3", "group1",
"0 0/2 8-17 * * ?");
sched.addJob(job, true);
ft = sched.scheduleJob(trigger);
log.info(job.getFullName() + " has been scheduled to run at: " + ft
+ " and repeat based on expression: "
+ trigger.getCronExpression()); // job 4 will run every three minutes but only between 5pm and 11pm
job = new JobDetail("job4", "group1", SimpleJob.class);
trigger = new CronTrigger("trigger4", "group1", "job4", "group1",
"0 0/3 17-23 * * ?");
sched.addJob(job, true);
ft = sched.scheduleJob(trigger);
log.info(job.getFullName() + " has been scheduled to run at: " + ft
+ " and repeat based on expression: "
+ trigger.getCronExpression()); // job 5 will run at 10am on the 1st and 15th days of the month
job = new JobDetail("job5", "group1", SimpleJob.class);
trigger = new CronTrigger("trigger5", "group1", "job5", "group1",
"0 0 10am 1,15 * ?");
sched.addJob(job, true);
ft = sched.scheduleJob(trigger);
log.info(job.getFullName() + " has been scheduled to run at: " + ft
+ " and repeat based on expression: "
+ trigger.getCronExpression()); // job 6 will run every 30 seconds but only on Weekdays (Monday through
// Friday)
job = new JobDetail("job6", "group1", SimpleJob.class);
trigger = new CronTrigger("trigger6", "group1", "job6", "group1",
"0,30 * * ? * MON-FRI");
sched.addJob(job, true);
ft = sched.scheduleJob(trigger);
log.info(job.getFullName() + " has been scheduled to run at: " + ft
+ " and repeat based on expression: "
+ trigger.getCronExpression()); // job 7 will run every 30 seconds but only on Weekends (Saturday and
// Sunday)
job = new JobDetail("job7", "group1", SimpleJob.class);
trigger = new CronTrigger("trigger7", "group1", "job7", "group1",
"0,30 * * ? * SAT,SUN");
sched.addJob(job, true);
ft = sched.scheduleJob(trigger);
log.info(job.getFullName() + " has been scheduled to run at: " + ft
+ " and repeat based on expression: "
+ trigger.getCronExpression()); 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 five minutes... ------------");
try {
// wait five minutes to show jobs
Thread.sleep(300L * 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 { CronTriggerExample example = new CronTriggerExample();
example.run();
} }
Example 3
=========
Overview:
=========
This example will demonstrate how to use Cron Triggers.
Running the Example:
====================
1. Windows users - Modify the example3.bat file (if necessary)
to set your JAVA_HOME. Run example3.bat
2. UNIX/Linux users - Modify the example3.sh file (if necessary)
to set your JAVA_HOME. Execute example3.sh
Configuration Files:
====================
1. You can decide to specify a log4j.properties file to
control logging output (optional)
[INFO] 02 二月 01:42:19.418 下午 main [org.quartz.examples.example3.CronTriggerExample]
------- Initializing ------------------- [INFO] 02 二月 01:42:19.440 下午 main [org.quartz.simpl.SimpleThreadPool]
Job execution threads will use class loader of thread: main [INFO] 02 二月 01:42:19.454 下午 main [org.quartz.core.SchedulerSignalerImpl]
Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl [INFO] 02 二月 01:42:19.455 下午 main [org.quartz.core.QuartzScheduler]
Quartz Scheduler v.1.8.5 created. [INFO] 02 二月 01:42:19.456 下午 main [org.quartz.simpl.RAMJobStore]
RAMJobStore initialized. [INFO] 02 二月 01:42:19.457 下午 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:42:19.457 下午 main [org.quartz.impl.StdSchedulerFactory]
Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties' [INFO] 02 二月 01:42:19.457 下午 main [org.quartz.impl.StdSchedulerFactory]
Quartz scheduler version: 1.8.5 [INFO] 02 二月 01:42:19.457 下午 main [org.quartz.examples.example3.CronTriggerExample]
------- Initialization Complete -------- [INFO] 02 二月 01:42:19.457 下午 main [org.quartz.examples.example3.CronTriggerExample]
------- Scheduling Jobs ---------------- [INFO] 02 二月 01:42:19.527 下午 main [org.quartz.examples.example3.CronTriggerExample]
group1.job1 has been scheduled to run at: Tue Feb 02 13:42:20 CST 2016 and repeat based on expression: 0/20 * * * * ? [INFO] 02 二月 01:42:19.528 下午 main [org.quartz.examples.example3.CronTriggerExample]
group1.job2 has been scheduled to run at: Tue Feb 02 13:44:15 CST 2016 and repeat based on expression: 15 0/2 * * * ? [INFO] 02 二月 01:42:19.530 下午 main [org.quartz.examples.example3.CronTriggerExample]
group1.job3 has been scheduled to run at: Tue Feb 02 13:44:00 CST 2016 and repeat based on expression: 0 0/2 8-17 * * ? [INFO] 02 二月 01:42:19.531 下午 main [org.quartz.examples.example3.CronTriggerExample]
group1.job4 has been scheduled to run at: Tue Feb 02 17:00:00 CST 2016 and repeat based on expression: 0 0/3 17-23 * * ? [INFO] 02 二月 01:42:19.533 下午 main [org.quartz.examples.example3.CronTriggerExample]
group1.job5 has been scheduled to run at: Mon Feb 15 10:00:00 CST 2016 and repeat based on expression: 0 0 10AM 1,15 * ? [INFO] 02 二月 01:42:19.535 下午 main [org.quartz.examples.example3.CronTriggerExample]
group1.job6 has been scheduled to run at: Tue Feb 02 13:42:30 CST 2016 and repeat based on expression: 0,30 * * ? * MON-FRI [INFO] 02 二月 01:42:19.536 下午 main [org.quartz.examples.example3.CronTriggerExample]
group1.job7 has been scheduled to run at: Sat Feb 06 00:00:00 CST 2016 and repeat based on expression: 0,30 * * ? * SAT,SUN [INFO] 02 二月 01:42:19.536 下午 main [org.quartz.examples.example3.CronTriggerExample]
------- Starting Scheduler ---------------- [INFO] 02 二月 01:42:19.536 下午 main [org.quartz.core.QuartzScheduler]
Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started. [INFO] 02 二月 01:42:19.537 下午 main [org.quartz.examples.example3.CronTriggerExample]
------- Started Scheduler ----------------- [INFO] 02 二月 01:42:19.537 下午 main [org.quartz.examples.example3.CronTriggerExample]
------- Waiting five minutes... ------------ [DEBUG] 02 二月 01:42:20.007 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job1', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:42:20.025 下午 DefaultQuartzScheduler_Worker-1 [org.quartz.core.JobRunShell]
Calling execute on job group1.job1 [INFO] 02 二月 01:42:20.026 下午 DefaultQuartzScheduler_Worker-1 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job1 executing at Tue Feb 02 13:42:20 CST 2016 [DEBUG] 02 二月 01:42:20.455 下午 Timer-0 [org.quartz.utils.UpdateChecker]
Checking for available updated version of Quartz... [DEBUG] 02 二月 01:42:30.000 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job6', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:42:30.001 下午 DefaultQuartzScheduler_Worker-2 [org.quartz.core.JobRunShell]
Calling execute on job group1.job6 [INFO] 02 二月 01:42:30.001 下午 DefaultQuartzScheduler_Worker-2 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job6 executing at Tue Feb 02 13:42:30 CST 2016 [DEBUG] 02 二月 01:42:40.002 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job1', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:42:40.003 下午 DefaultQuartzScheduler_Worker-3 [org.quartz.core.JobRunShell]
Calling execute on job group1.job1 [INFO] 02 二月 01:42:40.004 下午 DefaultQuartzScheduler_Worker-3 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job1 executing at Tue Feb 02 13:42:40 CST 2016 [DEBUG] 02 二月 01:43:00.001 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job1', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:43:00.002 下午 DefaultQuartzScheduler_Worker-4 [org.quartz.core.JobRunShell]
Calling execute on job group1.job1 [INFO] 02 二月 01:43:00.002 下午 DefaultQuartzScheduler_Worker-4 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job1 executing at Tue Feb 02 13:43:00 CST 2016 [DEBUG] 02 二月 01:43:00.003 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job6', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:43:00.005 下午 DefaultQuartzScheduler_Worker-5 [org.quartz.core.JobRunShell]
Calling execute on job group1.job6 [INFO] 02 二月 01:43:00.005 下午 DefaultQuartzScheduler_Worker-5 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job6 executing at Tue Feb 02 13:43:00 CST 2016 [DEBUG] 02 二月 01:43:20.001 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job1', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:43:20.002 下午 DefaultQuartzScheduler_Worker-6 [org.quartz.core.JobRunShell]
Calling execute on job group1.job1 [INFO] 02 二月 01:43:20.002 下午 DefaultQuartzScheduler_Worker-6 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job1 executing at Tue Feb 02 13:43:20 CST 2016 [DEBUG] 02 二月 01:43:30.006 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job6', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:43:30.007 下午 DefaultQuartzScheduler_Worker-7 [org.quartz.core.JobRunShell]
Calling execute on job group1.job6 [INFO] 02 二月 01:43:30.007 下午 DefaultQuartzScheduler_Worker-7 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job6 executing at Tue Feb 02 13:43:30 CST 2016 [DEBUG] 02 二月 01:43:40.002 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job1', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:43:40.002 下午 DefaultQuartzScheduler_Worker-8 [org.quartz.core.JobRunShell]
Calling execute on job group1.job1 [INFO] 02 二月 01:43:40.003 下午 DefaultQuartzScheduler_Worker-8 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job1 executing at Tue Feb 02 13:43:40 CST 2016 [DEBUG] 02 二月 01:44:00.001 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job1', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:44:00.002 下午 DefaultQuartzScheduler_Worker-9 [org.quartz.core.JobRunShell]
Calling execute on job group1.job1 [INFO] 02 二月 01:44:00.002 下午 DefaultQuartzScheduler_Worker-9 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job1 executing at Tue Feb 02 13:44:00 CST 2016 [DEBUG] 02 二月 01:44:00.003 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job3', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:44:00.004 下午 DefaultQuartzScheduler_Worker-10 [org.quartz.core.JobRunShell]
Calling execute on job group1.job3 [INFO] 02 二月 01:44:00.004 下午 DefaultQuartzScheduler_Worker-10 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job3 executing at Tue Feb 02 13:44:00 CST 2016 [DEBUG] 02 二月 01:44:00.005 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job6', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:44:00.005 下午 DefaultQuartzScheduler_Worker-1 [org.quartz.core.JobRunShell]
Calling execute on job group1.job6 [INFO] 02 二月 01:44:00.006 下午 DefaultQuartzScheduler_Worker-1 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job6 executing at Tue Feb 02 13:44:00 CST 2016 [DEBUG] 02 二月 01:44:15.002 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job2', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:44:15.003 下午 DefaultQuartzScheduler_Worker-2 [org.quartz.core.JobRunShell]
Calling execute on job group1.job2 [INFO] 02 二月 01:44:15.004 下午 DefaultQuartzScheduler_Worker-2 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job2 executing at Tue Feb 02 13:44:15 CST 2016 [DEBUG] 02 二月 01:44:20.002 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job1', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:44:20.002 下午 DefaultQuartzScheduler_Worker-3 [org.quartz.core.JobRunShell]
Calling execute on job group1.job1 [INFO] 02 二月 01:44:20.003 下午 DefaultQuartzScheduler_Worker-3 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job1 executing at Tue Feb 02 13:44:20 CST 2016 [DEBUG] 02 二月 01:44:30.002 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job6', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:44:30.003 下午 DefaultQuartzScheduler_Worker-4 [org.quartz.core.JobRunShell]
Calling execute on job group1.job6 [INFO] 02 二月 01:44:30.003 下午 DefaultQuartzScheduler_Worker-4 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job6 executing at Tue Feb 02 13:44:30 CST 2016 [DEBUG] 02 二月 01:44:40.002 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job1', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:44:40.003 下午 DefaultQuartzScheduler_Worker-5 [org.quartz.core.JobRunShell]
Calling execute on job group1.job1 [INFO] 02 二月 01:44:40.003 下午 DefaultQuartzScheduler_Worker-5 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job1 executing at Tue Feb 02 13:44:40 CST 2016 [DEBUG] 02 二月 01:45:00.002 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job1', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:45:00.006 下午 DefaultQuartzScheduler_Worker-6 [org.quartz.core.JobRunShell]
Calling execute on job group1.job1 [DEBUG] 02 二月 01:45:00.007 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job6', class=org.quartz.examples.example3.SimpleJob [INFO] 02 二月 01:45:00.007 下午 DefaultQuartzScheduler_Worker-6 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job1 executing at Tue Feb 02 13:45:00 CST 2016 [DEBUG] 02 二月 01:45:00.007 下午 DefaultQuartzScheduler_Worker-7 [org.quartz.core.JobRunShell]
Calling execute on job group1.job6 [INFO] 02 二月 01:45:00.008 下午 DefaultQuartzScheduler_Worker-7 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job6 executing at Tue Feb 02 13:45:00 CST 2016 [DEBUG] 02 二月 01:45:20.000 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job1', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:45:20.000 下午 DefaultQuartzScheduler_Worker-8 [org.quartz.core.JobRunShell]
Calling execute on job group1.job1 [INFO] 02 二月 01:45:20.001 下午 DefaultQuartzScheduler_Worker-8 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job1 executing at Tue Feb 02 13:45:20 CST 2016 [DEBUG] 02 二月 01:45:30.001 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job6', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:45:30.002 下午 DefaultQuartzScheduler_Worker-9 [org.quartz.core.JobRunShell]
Calling execute on job group1.job6 [INFO] 02 二月 01:45:30.002 下午 DefaultQuartzScheduler_Worker-9 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job6 executing at Tue Feb 02 13:45:30 CST 2016 [DEBUG] 02 二月 01:45:40.002 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job1', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:45:40.002 下午 DefaultQuartzScheduler_Worker-10 [org.quartz.core.JobRunShell]
Calling execute on job group1.job1 [INFO] 02 二月 01:45:40.003 下午 DefaultQuartzScheduler_Worker-10 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job1 executing at Tue Feb 02 13:45:40 CST 2016 [DEBUG] 02 二月 01:46:00.002 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job1', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:46:00.002 下午 DefaultQuartzScheduler_Worker-1 [org.quartz.core.JobRunShell]
Calling execute on job group1.job1 [INFO] 02 二月 01:46:00.003 下午 DefaultQuartzScheduler_Worker-1 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job1 executing at Tue Feb 02 13:46:00 CST 2016 [DEBUG] 02 二月 01:46:00.004 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job3', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:46:00.004 下午 DefaultQuartzScheduler_Worker-2 [org.quartz.core.JobRunShell]
Calling execute on job group1.job3 [INFO] 02 二月 01:46:00.005 下午 DefaultQuartzScheduler_Worker-2 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job3 executing at Tue Feb 02 13:46:00 CST 2016 [DEBUG] 02 二月 01:46:00.006 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job6', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:46:00.007 下午 DefaultQuartzScheduler_Worker-3 [org.quartz.core.JobRunShell]
Calling execute on job group1.job6 [INFO] 02 二月 01:46:00.007 下午 DefaultQuartzScheduler_Worker-3 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job6 executing at Tue Feb 02 13:46:00 CST 2016 [DEBUG] 02 二月 01:46:15.001 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job2', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:46:15.001 下午 DefaultQuartzScheduler_Worker-4 [org.quartz.core.JobRunShell]
Calling execute on job group1.job2 [INFO] 02 二月 01:46:15.002 下午 DefaultQuartzScheduler_Worker-4 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job2 executing at Tue Feb 02 13:46:15 CST 2016 [DEBUG] 02 二月 01:46:20.001 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job1', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:46:20.003 下午 DefaultQuartzScheduler_Worker-5 [org.quartz.core.JobRunShell]
Calling execute on job group1.job1 [INFO] 02 二月 01:46:20.003 下午 DefaultQuartzScheduler_Worker-5 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job1 executing at Tue Feb 02 13:46:20 CST 2016 [DEBUG] 02 二月 01:46:30.001 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job6', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:46:30.001 下午 DefaultQuartzScheduler_Worker-6 [org.quartz.core.JobRunShell]
Calling execute on job group1.job6 [INFO] 02 二月 01:46:30.002 下午 DefaultQuartzScheduler_Worker-6 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job6 executing at Tue Feb 02 13:46:30 CST 2016 [DEBUG] 02 二月 01:46:40.002 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job1', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:46:40.002 下午 DefaultQuartzScheduler_Worker-7 [org.quartz.core.JobRunShell]
Calling execute on job group1.job1 [INFO] 02 二月 01:46:40.003 下午 DefaultQuartzScheduler_Worker-7 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job1 executing at Tue Feb 02 13:46:40 CST 2016 [DEBUG] 02 二月 01:47:00.002 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job1', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:47:00.002 下午 DefaultQuartzScheduler_Worker-8 [org.quartz.core.JobRunShell]
Calling execute on job group1.job1 [INFO] 02 二月 01:47:00.003 下午 DefaultQuartzScheduler_Worker-8 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job1 executing at Tue Feb 02 13:47:00 CST 2016 [DEBUG] 02 二月 01:47:00.004 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
Producing instance of Job 'group1.job6', class=org.quartz.examples.example3.SimpleJob [DEBUG] 02 二月 01:47:00.004 下午 DefaultQuartzScheduler_Worker-9 [org.quartz.core.JobRunShell]
Calling execute on job group1.job6 [INFO] 02 二月 01:47:00.005 下午 DefaultQuartzScheduler_Worker-9 [org.quartz.examples.example3.SimpleJob]
SimpleJob says: group1.job6 executing at Tue Feb 02 13:47:00 CST 2016 [INFO] 02 二月 01:47:19.550 下午 main [org.quartz.examples.example3.CronTriggerExample]
------- Shutting Down --------------------- [INFO] 02 二月 01:47:19.551 下午 main [org.quartz.core.QuartzScheduler]
Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED shutting down. [INFO] 02 二月 01:47:19.551 下午 main [org.quartz.core.QuartzScheduler]
Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED paused. [DEBUG] 02 二月 01:47:19.552 下午 main [org.quartz.simpl.SimpleThreadPool]
shutdown complete [INFO] 02 二月 01:47:19.553 下午 main [org.quartz.core.QuartzScheduler]
Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED shutdown complete. [INFO] 02 二月 01:47:19.553 下午 main [org.quartz.examples.example3.CronTriggerExample]
------- Shutdown Complete ----------------- [INFO] 02 二月 01:47:19.554 下午 main [org.quartz.examples.example3.CronTriggerExample]
Executed 29 jobs. [DEBUG] 02 二月 01:47:19.645 下午 DefaultQuartzScheduler_Worker-9 [org.quartz.simpl.SimpleThreadPool]
WorkerThread is shut down. [DEBUG] 02 二月 01:47:19.645 下午 DefaultQuartzScheduler_Worker-8 [org.quartz.simpl.SimpleThreadPool]
WorkerThread is shut down. [DEBUG] 02 二月 01:47:19.740 下午 DefaultQuartzScheduler_Worker-10 [org.quartz.simpl.SimpleThreadPool]
WorkerThread is shut down. [DEBUG] 02 二月 01:47:19.740 下午 DefaultQuartzScheduler_Worker-7 [org.quartz.simpl.SimpleThreadPool]
WorkerThread is shut down. [DEBUG] 02 二月 01:47:19.832 下午 DefaultQuartzScheduler_Worker-6 [org.quartz.simpl.SimpleThreadPool]
WorkerThread is shut down. [DEBUG] 02 二月 01:47:19.954 下午 DefaultQuartzScheduler_Worker-4 [org.quartz.simpl.SimpleThreadPool]
WorkerThread is shut down. [DEBUG] 02 二月 01:47:19.954 下午 DefaultQuartzScheduler_Worker-5 [org.quartz.simpl.SimpleThreadPool]
WorkerThread is shut down. [DEBUG] 02 二月 01:47:20.051 下午 DefaultQuartzScheduler_Worker-1 [org.quartz.simpl.SimpleThreadPool]
WorkerThread is shut down. [DEBUG] 02 二月 01:47:20.051 下午 DefaultQuartzScheduler_Worker-3 [org.quartz.simpl.SimpleThreadPool]
WorkerThread is shut down. [DEBUG] 02 二月 01:47:20.051 下午 DefaultQuartzScheduler_Worker-2 [org.quartz.simpl.SimpleThreadPool]
WorkerThread is shut down.
Quartz1.8.5例子(三)的更多相关文章
- 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 ...
- go例子(三) 使用context实现发牌手策略
使用context包实现发牌手策略, 发牌手策略:罗永浩在介绍TNT工作站时描述,将一个任务分发给多个处理者处理,谁先处理完使用谁的结果,取消其他的处理者的任务. 经典的例子:同时在百度.google ...
- 从零开始学习Node.js例子三 图片上传和显示
index.js var server = require("./server"); var router = require("./router"); var ...
- Quartz1.8.5例子(十四)
org.quartz.scheduler.instanceName: PriorityExampleScheduler # Set thread count to 1 to force Trigger ...
- 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 ...
- Quartz1.8.5例子(八)
/* * Copyright 2005 - 2009 Terracotta, Inc. * * Licensed under the Apache License, Version 2.0 (the ...
随机推荐
- 单片机IO口驱动能力
以STM32的IO口为例,最大的输出电流和灌入电流在芯片手册上都有说明.单个IO口一般都是十几mA到几十mA,同时总的VDD电流也有限制,大概为150mA.所以单片机驱动外设时,如果不是信号型而是功率 ...
- JS获取和设置光标的位置
<html> <head> <script language="javascript"> function getCursortPosition ...
- 基于Shading Model(对光照变化一定不变性)的运动目标检测算法
光照模型(Shading Model)在很多论文中得到了广泛的应用,如robust and illumination invariant change detection based on linea ...
- PHP文件头部(header)解释
1. Accept:告诉WEB服务器自己接受什么介质类型,*/* 表示任何类型,type/* 表示该类型下的所有子类型,type/sub-type. 2. Accept-Charset: 浏览器申 ...
- 使用QEMU创建虚拟机
下载安装: wget http://wiki.qemu-project.org/download/qemu-2.0.0.tar.bz2 tar xjvf qemu- ./configure --ena ...
- /dev/tty 与 /dev/pts
打开3个bash会话窗口 [root@server1 fd]# cd /proc/7489/fd[root@server1 fd]# ll总用量 0lrwx------ 1 root root 6 ...
- hadoop错误Cannot load libsnappy.so.1 (libsnappy.so.1 cannot open shared object file No such file or directory)!
报如下错误 解决方法: 1.下载libsnappy.so.1(https://yunpan.cn/cSHRHTBJGVVX6 访问密码 c992) 2.上传到linux系统 3.安装 4.安装完成后 ...
- IOS Remote Notification
1. 本地证书合成 rm *.pem echo "export cert..." openssl pkcs12 -clcerts -nokeys -out push_cert.pe ...
- apache安全之修改或隐藏版本信息
修改apache版本信息 在安装之前,编辑原文件httpd-2.2.31/include/ap_release.h文件如下: 40 #define AP_SERVER_BASEVENDO ...
- favicon.ico显示,favicon显示,favicon图标显示
favicon.ico显示,favicon显示,favicon图标显示 >>>>>>>>>>>>>>>> ...