org.quartz.core.QuartzScheduler Java Examples

The following examples show how to use org.quartz.core.QuartzScheduler. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: QuartzWebManager.java    From quartz-web with Apache License 2.0 6 votes vote down vote up
public static BasicInfo getBasicInfo() {
    String versionIteration = QuartzScheduler.getVersionIteration();
    String versionMajor = QuartzScheduler.getVersionMajor();
    String versionMinor = QuartzScheduler.getVersionMinor();
    BasicInfo basicInfo = new BasicInfo();
    basicInfo.setQuartzWebVersion(VERSION.getVersionNumber());
    basicInfo.setVersionMajor(versionMajor);
    basicInfo.setVersionMinor(versionMinor);
    basicInfo.setVersionIteration(versionIteration);
    basicInfo.setQuartzVersion(versionMajor + "." + versionMinor + "." + versionIteration);
    basicInfo.setJavaVMStartTime(DateUtils.getVMStartTime());
    basicInfo.setJavaVMName(System.getProperty("java.vm.name"));
    basicInfo.setJavaVersion(System.getProperty("java.version"));
    basicInfo.setJavaClassPath(System.getProperty("java.class.path"));
    return basicInfo;
}
 
Example #2
Source File: QuartzSchedulerSPI.java    From nexus-public with Eclipse Public License 1.0 6 votes vote down vote up
@Override
protected void doStart() throws Exception {
  // create new scheduler
  scheduler = schedulerProvider.get();

  try {
    // access internal scheduler to simulate signals for remote updates
    Field schedField = scheduler.getClass().getDeclaredField("sched");
    schedField.setAccessible(true);
    quartzScheduler = (QuartzScheduler) schedField.get(scheduler);
  }
  catch (Exception | LinkageError e) {
    log.error("Cannot find QuartzScheduler", e);
    throw e;
  }

  // re-attach listeners right after scheduler is available
  reattachListeners();
}
 
Example #3
Source File: AlfrescoSchedulerFactory.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
protected Scheduler instantiate(QuartzSchedulerResources rsrcs, QuartzScheduler qs)
{
    Scheduler scheduler = super.instantiate(rsrcs, qs);
    JobStore jobStore = rsrcs.getJobStore();
    if (jobStore instanceof SchedulerAware)
    {
        ((SchedulerAware) jobStore).setScheduler(scheduler);
    }
    return scheduler;
}
 
Example #4
Source File: StdSchedulerFactory.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
private void shutdownFromInstantiateException(ThreadPool tp, QuartzScheduler qs, boolean tpInited, boolean qsInited) {
    try {
        if(qsInited)
            qs.shutdown(false);
        else if(tpInited)
            tp.shutdown(false);
    } catch (Exception e) {
        getLog().error("Got another exception while shutting down after instantiation exception", e);
    }
}
 
Example #5
Source File: StdSchedulerFactory.java    From AsuraFramework with Apache License 2.0 5 votes vote down vote up
protected Scheduler instantiate(QuartzSchedulerResources rsrcs, QuartzScheduler qs) {
    SchedulingContext schedCtxt = new SchedulingContext();
    schedCtxt.setInstanceId(rsrcs.getInstanceId());

    Scheduler scheduler = new StdScheduler(qs, schedCtxt);
    return scheduler;
}
 
Example #6
Source File: UpdateChecker.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
private String getQuartzVersion() {
  return String.format("%s.%s.%s", QuartzScheduler.getVersionMajor(), QuartzScheduler.getVersionMinor(),
                       QuartzScheduler.getVersionIteration());
}
 
Example #7
Source File: VersionPrinter.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public static void main(String[] args) {
    System.out.println("Quartz version: " + QuartzScheduler.getVersionMajor()
            + "." + QuartzScheduler.getVersionMinor() + "."
            + QuartzScheduler.getVersionIteration());
}
 
Example #8
Source File: UpdateChecker.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
private String getQuartzVersion() {
  return String.format("%s.%s.%s", QuartzScheduler.getVersionMajor(), QuartzScheduler.getVersionMinor(),
                       QuartzScheduler.getVersionIteration());
}
 
Example #9
Source File: StdSchedulerFactory.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
protected Scheduler instantiate(QuartzSchedulerResources rsrcs, QuartzScheduler qs) {

        Scheduler scheduler = new StdScheduler(qs);
        return scheduler;
    }
 
Example #10
Source File: VersionPrinter.java    From AsuraFramework with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) {
    System.out.println("Quartz version: " + QuartzScheduler.getVersionMajor()
            + "." + QuartzScheduler.getVersionMinor() + "."
            + QuartzScheduler.getVersionIteration());
}
 
Example #11
Source File: UpdateChecker.java    From AsuraFramework with Apache License 2.0 4 votes vote down vote up
private String getQuartzVersion() {
  return String.format("%s.%s.%s", QuartzScheduler.getVersionMajor(), QuartzScheduler.getVersionMinor(),
                       QuartzScheduler.getVersionIteration());
}
 
Example #12
Source File: QwartzServer.java    From MtgDesktopCompanion with GNU General Public License v3.0 4 votes vote down vote up
@Override
public String getVersion() {
	return QuartzScheduler.getVersionMajor() +"."+QuartzScheduler.getVersionMinor() +"."+QuartzScheduler.getVersionIteration();
}
 
Example #13
Source File: ManagementServer.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Puts the submitted resource under the purview of this {@code ManagementServer}.
 *
 * @param managedResource the resource to be managed
 */
public void register(QuartzScheduler managedResource);
 
Example #14
Source File: ManagementServer.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Removes the submitted resource under the purview of this {@code ManagementServer}.
 *
 * @param managedResource the resource to be managed
 */
public void unregister(QuartzScheduler managedResource);
 
Example #15
Source File: StdScheduler.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * <p>
 * Construct a <code>StdScheduler</code> instance to proxy the given
 * <code>QuartzScheduler</code> instance, and with the given <code>SchedulingContext</code>.
 * </p>
 */
public StdScheduler(QuartzScheduler sched) {
    this.sched = sched;
}
 
Example #16
Source File: StdScheduler.java    From AsuraFramework with Apache License 2.0 2 votes vote down vote up
/**
 * <p>
 * Construct a <code>StdScheduler</code> instance to proxy the given
 * <code>QuartzScheduler</code> instance, and with the given <code>SchedulingContext</code>.
 * </p>
 */
public StdScheduler(QuartzScheduler sched, SchedulingContext schedCtxt) {
    this.sched = sched;
    this.schedCtxt = schedCtxt;
}