• 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.example7;
    
    import java.util.Date;
    
    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;
    
    import org.slf4j.LoggerFactory;
    import org.slf4j.Logger;
    
    /**
     * Demonstrates the behavior of <code>StatefulJob</code>s, as well as how
     * misfire instructions affect the firings of triggers of <code>StatefulJob</code>
     * s - when the jobs take longer to execute that the frequency of the trigger's
     * repitition.
     * 
     * <p>
     * While the example is running, you should note that there are two triggers
     * with identical schedules, firing identical jobs. The triggers "want" to fire
     * every 3 seconds, but the jobs take 10 seconds to execute. Therefore, by the
     * time the jobs complete their execution, the triggers have already "misfired"
     * (unless the scheduler's "misfire threshold" has been set to more than 7
     * seconds). You should see that one of the jobs has its misfire instruction
     * set to <code>SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT</code>-
     * which causes it to fire immediately, when the misfire is detected. The other
     * trigger uses the default "smart policy" misfire instruction, which causes
     * the trigger to advance to its next fire time (skipping those that it has
     * missed) - so that it does not refire immediately, but rather at the next
     * scheduled time.
     * </p>
     * 
     * @author <a href="mailto:bonhamcm@thirdeyeconsulting.com">Chris Bonham</a>
     */
    public class InterruptExample {
    
        public void run() throws Exception {
            final Logger log = LoggerFactory.getLogger(InterruptExample.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, 15).getTime();
    
            JobDetail job = new JobDetail("interruptableJob1", "group1",
                    DumbInterruptableJob.class);
            SimpleTrigger trigger = 
                new SimpleTrigger("trigger1", "group1", 
                        new Date(ts), 
                        null, 
                        SimpleTrigger.REPEAT_INDEFINITELY, 
                        5000L);
            Date ft = sched.scheduleJob(job, trigger);
            log.info(job.getFullName() + " will run at: " + ft + " and repeat: "
                    + trigger.getRepeatCount() + " times, every "
                    + trigger.getRepeatInterval() / 1000 + " seconds");
    
            // start up the scheduler (jobs do not start to fire until
            // the scheduler has been started)
            sched.start();
            log.info("------- Started Scheduler -----------------");
            
    
            log.info("------- Starting loop to interrupt job every 7 seconds ----------");
            for(int i=0; i < 50; i++) {
                try {
                    Thread.sleep(7000L); 
                    // tell the scheduler to interrupt our job
                    sched.interrupt(job.getName(), job.getGroup());
                } 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 {
    
            InterruptExample example = new InterruptExample();
            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.example7;
    
    import java.util.Date;
    
    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;
    import org.quartz.InterruptableJob;
    import org.quartz.JobExecutionContext;
    import org.quartz.JobExecutionException;
    import org.quartz.UnableToInterruptJobException;
    
    
    /**
     * <p>
     * A dumb implementation of an InterruptableJob, for unittesting purposes.
     * </p>
     * 
     * @author <a href="mailto:bonhamcm@thirdeyeconsulting.com">Chris Bonham</a>
     * @author Bill Kratzer
     */
    public class DumbInterruptableJob implements InterruptableJob {
        
        // logging services
        private static Logger _log = LoggerFactory.getLogger(DumbInterruptableJob.class);
        
        // has the job been interrupted?
        private boolean _interrupted = false;
    
        // job name 
        private String _jobName = "";
        
        /**
         * <p>
         * Empty constructor for job initilization
         * </p>
         */
        public DumbInterruptableJob() {
        }
    
    
        /**
         * <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 {
    
            _jobName = context.getJobDetail().getFullName();
            _log.info("---- " + _jobName + " executing at " + new Date());
    
            try {
                // main job loop... see the JavaDOC for InterruptableJob for discussion...
                // do some work... in this example we are 'simulating' work by sleeping... :)
    
                for (int i = 0; i < 4; i++) {
                    try {
                        Thread.sleep(1000L);
                    } catch (Exception ignore) {
                        ignore.printStackTrace();
                    }
                    
                    // periodically check if we've been interrupted...
                    if(_interrupted) {
                        _log.info("--- " + _jobName + "  -- Interrupted... bailing out!");
                        return; // could also choose to throw a JobExecutionException 
                                 // if that made for sense based on the particular  
                                 // job's responsibilities/behaviors
                    }
                }
                
            } finally {
                _log.info("---- " + _jobName + " completed at " + new Date());
            }
        }
        
        /**
         * <p>
         * Called by the <code>{@link Scheduler}</code> when a user
         * interrupts the <code>Job</code>.
         * </p>
         * 
         * @return void (nothing) if job interrupt is successful.
         * @throws JobExecutionException
         *           if there is an exception while interrupting the job.
         */
        public void interrupt() throws UnableToInterruptJobException {
            _log.info("---" + "  -- INTERRUPTING --");
            _interrupted = true;
        }
    
    }
    
    [INFO] 02 二月 03:42:22.832 下午 main [org.quartz.examples.example7.InterruptExample]
    ------- Initializing ----------------------
    
    [INFO] 02 二月 03:42:22.856 下午 main [org.quartz.simpl.SimpleThreadPool]
    Job execution threads will use class loader of thread: main
    
    [INFO] 02 二月 03:42:22.868 下午 main [org.quartz.core.SchedulerSignalerImpl]
    Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
    
    [INFO] 02 二月 03:42:22.869 下午 main [org.quartz.core.QuartzScheduler]
    Quartz Scheduler v.1.8.5 created.
    
    [INFO] 02 二月 03:42:22.870 下午 main [org.quartz.simpl.RAMJobStore]
    RAMJobStore initialized.
    
    [INFO] 02 二月 03:42:22.871 下午 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 二月 03:42:22.871 下午 main [org.quartz.impl.StdSchedulerFactory]
    Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
    
    [INFO] 02 二月 03:42:22.871 下午 main [org.quartz.impl.StdSchedulerFactory]
    Quartz scheduler version: 1.8.5
    
    [INFO] 02 二月 03:42:22.871 下午 main [org.quartz.examples.example7.InterruptExample]
    ------- Initialization Complete -----------
    
    [INFO] 02 二月 03:42:22.871 下午 main [org.quartz.examples.example7.InterruptExample]
    ------- Scheduling Jobs -------------------
    
    [INFO] 02 二月 03:42:22.876 下午 main [org.quartz.examples.example7.InterruptExample]
    group1.interruptableJob1 will run at: Tue Feb 02 15:42:30 CST 2016 and repeat: -1 times, every 5 seconds
    
    [INFO] 02 二月 03:42:22.876 下午 main [org.quartz.core.QuartzScheduler]
    Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
    
    [INFO] 02 二月 03:42:22.876 下午 main [org.quartz.examples.example7.InterruptExample]
    ------- Started Scheduler -----------------
    
    [INFO] 02 二月 03:42:22.877 下午 main [org.quartz.examples.example7.InterruptExample]
    ------- Starting loop to interrupt job every 7 seconds ----------
    
    [DEBUG] 02 二月 03:42:23.883 下午 Timer-0 [org.quartz.utils.UpdateChecker]
    Checking for available updated version of Quartz...
    
    [DEBUG] 02 二月 03:42:30.000 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
    Producing instance of Job 'group1.interruptableJob1', class=org.quartz.examples.example7.DumbInterruptableJob
    
    [DEBUG] 02 二月 03:42:30.018 下午 DefaultQuartzScheduler_Worker-1 [org.quartz.core.JobRunShell]
    Calling execute on job group1.interruptableJob1
    
    [INFO] 02 二月 03:42:30.030 下午 DefaultQuartzScheduler_Worker-1 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 executing at Tue Feb 02 15:42:30 CST 2016
    
    [INFO] 02 二月 03:42:34.043 下午 DefaultQuartzScheduler_Worker-1 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 completed at Tue Feb 02 15:42:34 CST 2016
    
    [DEBUG] 02 二月 03:42:35.007 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
    Producing instance of Job 'group1.interruptableJob1', class=org.quartz.examples.example7.DumbInterruptableJob
    
    [DEBUG] 02 二月 03:42:35.008 下午 DefaultQuartzScheduler_Worker-2 [org.quartz.core.JobRunShell]
    Calling execute on job group1.interruptableJob1
    
    [INFO] 02 二月 03:42:35.009 下午 DefaultQuartzScheduler_Worker-2 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 executing at Tue Feb 02 15:42:35 CST 2016
    
    [INFO] 02 二月 03:42:36.878 下午 main [org.quartz.examples.example7.DumbInterruptableJob]
    ---  -- INTERRUPTING --
    
    [INFO] 02 二月 03:42:37.020 下午 DefaultQuartzScheduler_Worker-2 [org.quartz.examples.example7.DumbInterruptableJob]
    --- group1.interruptableJob1  -- Interrupted... bailing out!
    
    [INFO] 02 二月 03:42:37.020 下午 DefaultQuartzScheduler_Worker-2 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 completed at Tue Feb 02 15:42:37 CST 2016
    
    [DEBUG] 02 二月 03:42:40.000 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
    Producing instance of Job 'group1.interruptableJob1', class=org.quartz.examples.example7.DumbInterruptableJob
    
    [DEBUG] 02 二月 03:42:40.000 下午 DefaultQuartzScheduler_Worker-3 [org.quartz.core.JobRunShell]
    Calling execute on job group1.interruptableJob1
    
    [INFO] 02 二月 03:42:40.001 下午 DefaultQuartzScheduler_Worker-3 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 executing at Tue Feb 02 15:42:40 CST 2016
    
    [INFO] 02 二月 03:42:43.879 下午 main [org.quartz.examples.example7.DumbInterruptableJob]
    ---  -- INTERRUPTING --
    
    [INFO] 02 二月 03:42:44.039 下午 DefaultQuartzScheduler_Worker-3 [org.quartz.examples.example7.DumbInterruptableJob]
    --- group1.interruptableJob1  -- Interrupted... bailing out!
    
    [INFO] 02 二月 03:42:44.039 下午 DefaultQuartzScheduler_Worker-3 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 completed at Tue Feb 02 15:42:44 CST 2016
    
    [DEBUG] 02 二月 03:42:45.001 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
    Producing instance of Job 'group1.interruptableJob1', class=org.quartz.examples.example7.DumbInterruptableJob
    
    [DEBUG] 02 二月 03:42:45.002 下午 DefaultQuartzScheduler_Worker-4 [org.quartz.core.JobRunShell]
    Calling execute on job group1.interruptableJob1
    
    [INFO] 02 二月 03:42:45.002 下午 DefaultQuartzScheduler_Worker-4 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 executing at Tue Feb 02 15:42:45 CST 2016
    
    [INFO] 02 二月 03:42:49.005 下午 DefaultQuartzScheduler_Worker-4 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 completed at Tue Feb 02 15:42:49 CST 2016
    
    [DEBUG] 02 二月 03:42:50.000 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
    Producing instance of Job 'group1.interruptableJob1', class=org.quartz.examples.example7.DumbInterruptableJob
    
    [DEBUG] 02 二月 03:42:50.000 下午 DefaultQuartzScheduler_Worker-5 [org.quartz.core.JobRunShell]
    Calling execute on job group1.interruptableJob1
    
    [INFO] 02 二月 03:42:50.000 下午 DefaultQuartzScheduler_Worker-5 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 executing at Tue Feb 02 15:42:50 CST 2016
    
    [INFO] 02 二月 03:42:50.886 下午 main [org.quartz.examples.example7.DumbInterruptableJob]
    ---  -- INTERRUPTING --
    
    [INFO] 02 二月 03:42:51.014 下午 DefaultQuartzScheduler_Worker-5 [org.quartz.examples.example7.DumbInterruptableJob]
    --- group1.interruptableJob1  -- Interrupted... bailing out!
    
    [INFO] 02 二月 03:42:51.014 下午 DefaultQuartzScheduler_Worker-5 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 completed at Tue Feb 02 15:42:51 CST 2016
    
    [DEBUG] 02 二月 03:42:55.001 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
    Producing instance of Job 'group1.interruptableJob1', class=org.quartz.examples.example7.DumbInterruptableJob
    
    [DEBUG] 02 二月 03:42:55.001 下午 DefaultQuartzScheduler_Worker-6 [org.quartz.core.JobRunShell]
    Calling execute on job group1.interruptableJob1
    
    [INFO] 02 二月 03:42:55.001 下午 DefaultQuartzScheduler_Worker-6 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 executing at Tue Feb 02 15:42:55 CST 2016
    
    [INFO] 02 二月 03:42:57.887 下午 main [org.quartz.examples.example7.DumbInterruptableJob]
    ---  -- INTERRUPTING --
    
    [INFO] 02 二月 03:42:58.003 下午 DefaultQuartzScheduler_Worker-6 [org.quartz.examples.example7.DumbInterruptableJob]
    --- group1.interruptableJob1  -- Interrupted... bailing out!
    
    [INFO] 02 二月 03:42:58.003 下午 DefaultQuartzScheduler_Worker-6 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 completed at Tue Feb 02 15:42:58 CST 2016
    
    [DEBUG] 02 二月 03:43:00.005 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
    Producing instance of Job 'group1.interruptableJob1', class=org.quartz.examples.example7.DumbInterruptableJob
    
    [DEBUG] 02 二月 03:43:00.005 下午 DefaultQuartzScheduler_Worker-7 [org.quartz.core.JobRunShell]
    Calling execute on job group1.interruptableJob1
    
    [INFO] 02 二月 03:43:00.006 下午 DefaultQuartzScheduler_Worker-7 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 executing at Tue Feb 02 15:43:00 CST 2016
    
    [INFO] 02 二月 03:43:04.023 下午 DefaultQuartzScheduler_Worker-7 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 completed at Tue Feb 02 15:43:04 CST 2016
    
    [DEBUG] 02 二月 03:43:05.000 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
    Producing instance of Job 'group1.interruptableJob1', class=org.quartz.examples.example7.DumbInterruptableJob
    
    [DEBUG] 02 二月 03:43:05.001 下午 DefaultQuartzScheduler_Worker-8 [org.quartz.core.JobRunShell]
    Calling execute on job group1.interruptableJob1
    
    [INFO] 02 二月 03:43:05.001 下午 DefaultQuartzScheduler_Worker-8 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 executing at Tue Feb 02 15:43:05 CST 2016
    
    [INFO] 02 二月 03:43:09.018 下午 DefaultQuartzScheduler_Worker-8 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 completed at Tue Feb 02 15:43:09 CST 2016
    
    [DEBUG] 02 二月 03:43:10.001 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
    Producing instance of Job 'group1.interruptableJob1', class=org.quartz.examples.example7.DumbInterruptableJob
    
    [DEBUG] 02 二月 03:43:10.001 下午 DefaultQuartzScheduler_Worker-9 [org.quartz.core.JobRunShell]
    Calling execute on job group1.interruptableJob1
    
    [INFO] 02 二月 03:43:10.002 下午 DefaultQuartzScheduler_Worker-9 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 executing at Tue Feb 02 15:43:10 CST 2016
    
    [INFO] 02 二月 03:43:11.896 下午 main [org.quartz.examples.example7.DumbInterruptableJob]
    ---  -- INTERRUPTING --
    
    [INFO] 02 二月 03:43:12.002 下午 DefaultQuartzScheduler_Worker-9 [org.quartz.examples.example7.DumbInterruptableJob]
    --- group1.interruptableJob1  -- Interrupted... bailing out!
    
    [INFO] 02 二月 03:43:12.002 下午 DefaultQuartzScheduler_Worker-9 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 completed at Tue Feb 02 15:43:12 CST 2016
    
    [DEBUG] 02 二月 03:43:15.000 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
    Producing instance of Job 'group1.interruptableJob1', class=org.quartz.examples.example7.DumbInterruptableJob
    
    [DEBUG] 02 二月 03:43:15.000 下午 DefaultQuartzScheduler_Worker-10 [org.quartz.core.JobRunShell]
    Calling execute on job group1.interruptableJob1
    
    [INFO] 02 二月 03:43:15.000 下午 DefaultQuartzScheduler_Worker-10 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 executing at Tue Feb 02 15:43:15 CST 2016
    
    [INFO] 02 二月 03:43:18.897 下午 main [org.quartz.examples.example7.DumbInterruptableJob]
    ---  -- INTERRUPTING --
    
    [INFO] 02 二月 03:43:19.004 下午 DefaultQuartzScheduler_Worker-10 [org.quartz.examples.example7.DumbInterruptableJob]
    --- group1.interruptableJob1  -- Interrupted... bailing out!
    
    [INFO] 02 二月 03:43:19.004 下午 DefaultQuartzScheduler_Worker-10 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 completed at Tue Feb 02 15:43:19 CST 2016
    
    [DEBUG] 02 二月 03:43:20.001 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
    Producing instance of Job 'group1.interruptableJob1', class=org.quartz.examples.example7.DumbInterruptableJob
    
    [DEBUG] 02 二月 03:43:20.001 下午 DefaultQuartzScheduler_Worker-1 [org.quartz.core.JobRunShell]
    Calling execute on job group1.interruptableJob1
    
    [INFO] 02 二月 03:43:20.001 下午 DefaultQuartzScheduler_Worker-1 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 executing at Tue Feb 02 15:43:20 CST 2016
    
    [INFO] 02 二月 03:43:24.024 下午 DefaultQuartzScheduler_Worker-1 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 completed at Tue Feb 02 15:43:24 CST 2016
    
    [DEBUG] 02 二月 03:43:25.000 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
    Producing instance of Job 'group1.interruptableJob1', class=org.quartz.examples.example7.DumbInterruptableJob
    
    [DEBUG] 02 二月 03:43:25.000 下午 DefaultQuartzScheduler_Worker-2 [org.quartz.core.JobRunShell]
    Calling execute on job group1.interruptableJob1
    
    [INFO] 02 二月 03:43:25.000 下午 DefaultQuartzScheduler_Worker-2 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 executing at Tue Feb 02 15:43:25 CST 2016
    
    [INFO] 02 二月 03:43:25.899 下午 main [org.quartz.examples.example7.DumbInterruptableJob]
    ---  -- INTERRUPTING --
    
    [INFO] 02 二月 03:43:26.000 下午 DefaultQuartzScheduler_Worker-2 [org.quartz.examples.example7.DumbInterruptableJob]
    --- group1.interruptableJob1  -- Interrupted... bailing out!
    
    [INFO] 02 二月 03:43:26.000 下午 DefaultQuartzScheduler_Worker-2 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 completed at Tue Feb 02 15:43:26 CST 2016
    
    [DEBUG] 02 二月 03:43:30.000 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
    Producing instance of Job 'group1.interruptableJob1', class=org.quartz.examples.example7.DumbInterruptableJob
    
    [DEBUG] 02 二月 03:43:30.001 下午 DefaultQuartzScheduler_Worker-3 [org.quartz.core.JobRunShell]
    Calling execute on job group1.interruptableJob1
    
    [INFO] 02 二月 03:43:30.001 下午 DefaultQuartzScheduler_Worker-3 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 executing at Tue Feb 02 15:43:30 CST 2016
    
    [INFO] 02 二月 03:43:32.900 下午 main [org.quartz.examples.example7.DumbInterruptableJob]
    ---  -- INTERRUPTING --
    
    [INFO] 02 二月 03:43:33.002 下午 DefaultQuartzScheduler_Worker-3 [org.quartz.examples.example7.DumbInterruptableJob]
    --- group1.interruptableJob1  -- Interrupted... bailing out!
    
    [INFO] 02 二月 03:43:33.002 下午 DefaultQuartzScheduler_Worker-3 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 completed at Tue Feb 02 15:43:33 CST 2016
    
    [DEBUG] 02 二月 03:43:35.001 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
    Producing instance of Job 'group1.interruptableJob1', class=org.quartz.examples.example7.DumbInterruptableJob
    
    [DEBUG] 02 二月 03:43:35.001 下午 DefaultQuartzScheduler_Worker-4 [org.quartz.core.JobRunShell]
    Calling execute on job group1.interruptableJob1
    
    [INFO] 02 二月 03:43:35.001 下午 DefaultQuartzScheduler_Worker-4 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 executing at Tue Feb 02 15:43:35 CST 2016
    
    [INFO] 02 二月 03:43:39.001 下午 DefaultQuartzScheduler_Worker-4 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 completed at Tue Feb 02 15:43:39 CST 2016
    
    [DEBUG] 02 二月 03:43:40.001 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
    Producing instance of Job 'group1.interruptableJob1', class=org.quartz.examples.example7.DumbInterruptableJob
    
    [DEBUG] 02 二月 03:43:40.002 下午 DefaultQuartzScheduler_Worker-5 [org.quartz.core.JobRunShell]
    Calling execute on job group1.interruptableJob1
    
    [INFO] 02 二月 03:43:40.002 下午 DefaultQuartzScheduler_Worker-5 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 executing at Tue Feb 02 15:43:40 CST 2016
    
    [INFO] 02 二月 03:43:44.028 下午 DefaultQuartzScheduler_Worker-5 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 completed at Tue Feb 02 15:43:44 CST 2016
    
    [DEBUG] 02 二月 03:43:45.000 下午 DefaultQuartzScheduler_QuartzSchedulerThread [org.quartz.simpl.SimpleJobFactory]
    Producing instance of Job 'group1.interruptableJob1', class=org.quartz.examples.example7.DumbInterruptableJob
    
    [DEBUG] 02 二月 03:43:45.001 下午 DefaultQuartzScheduler_Worker-6 [org.quartz.core.JobRunShell]
    Calling execute on job group1.interruptableJob1
    
    [INFO] 02 二月 03:43:45.002 下午 DefaultQuartzScheduler_Worker-6 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 executing at Tue Feb 02 15:43:45 CST 2016
    
    [INFO] 02 二月 03:43:46.908 下午 main [org.quartz.examples.example7.DumbInterruptableJob]
    ---  -- INTERRUPTING --
    
    [INFO] 02 二月 03:43:47.003 下午 DefaultQuartzScheduler_Worker-6 [org.quartz.examples.example7.DumbInterruptableJob]
    --- group1.interruptableJob1  -- Interrupted... bailing out!
    
    [INFO] 02 二月 03:43:47.003 下午 DefaultQuartzScheduler_Worker-6 [org.quartz.examples.example7.DumbInterruptableJob]
    ---- group1.interruptableJob1 completed at Tue Feb 02 15:43:47 CST 2016
    

      

      

  • 相关阅读:
    【WEBI专题】解决在交叉表中计算占比、偏差、率的问题
    前导零的问题(增加/删除)
    在SAP BW中使用ABAP
    如何组织维度
    BEx Query Designer中的变量及其增强
    《魔幻手机》经典台词摘录
    今天发现了VISTA系统的一个BUG
    Online Tools And Sofrware Directory Entry
    [转载]博客园通过Word 2007发布随笔
    为你的程序增加记忆功能
  • 原文地址:https://www.cnblogs.com/wuxinliulei/p/5177723.html
Copyright © 2020-2023  润新知