congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Trigger.getNextFireTime
Code IndexAdd Tabnine to your IDE (free)

How to use
getNextFireTime
method
in
org.quartz.triggers.Trigger

Best Java code snippets using org.quartz.triggers.Trigger.getNextFireTime (Showing top 8 results out of 315)

origin: mycontroller-org/mycontroller

public static synchronized Long nextFireTime(String _name, Integer _id) {
  String _triggerName = getCronTriggerName(getTimerJobName(_name, _id));
  try {
    return SundialJobScheduler.getScheduler().getTrigger(_triggerName).getNextFireTime().getTime();
  } catch (Exception ex) {
    _logger.error("Error when fetching trigger[{}] next exeuction status", _triggerName, ex);
  }
  return null;
}
origin: knowm/Sundial

 @Override
 public int compare(Trigger trig1, Trigger trig2) {
  Date t1 = trig1.getNextFireTime();
  Date t2 = trig2.getNextFireTime();
  if (t1 != null || t2 != null) {
   if (t1 == null) {
    return 1;
   }
   if (t2 == null) {
    return -1;
   }
   if (t1.before(t2)) {
    return -1;
   }
   if (t1.after(t2)) {
    return 1;
   }
  }
  int comp = trig2.getPriority() - trig1.getPriority();
  if (comp != 0) {
   return comp;
  }
  return trig1.getName().compareTo(trig2.getName());
 }
}
origin: org.mycontroller.standalone/mycontroller-core

public static synchronized Long nextFireTime(String _name, Integer _id) {
  String _triggerName = getCronTriggerName(getTimerJobName(_name, _id));
  try {
    return SundialJobScheduler.getScheduler().getTrigger(_triggerName).getNextFireTime().getTime();
  } catch (Exception ex) {
    _logger.error("Error when fetching trigger[{}] next exeuction status", _triggerName, ex);
  }
  return null;
}
origin: com.xeiam/sundial

 @Override
 public int compare(Trigger trig1, Trigger trig2) {
  Date t1 = trig1.getNextFireTime();
  Date t2 = trig2.getNextFireTime();
  if (t1 != null || t2 != null) {
   if (t1 == null) {
    return 1;
   }
   if (t2 == null) {
    return -1;
   }
   if (t1.before(t2)) {
    return -1;
   }
   if (t1.after(t2)) {
    return 1;
   }
  }
  int comp = trig2.getPriority() - trig1.getPriority();
  if (comp != 0) {
   return comp;
  }
  return trig1.getName().compareTo(trig2.getName());
 }
}
origin: org.knowm/sundial

 @Override
 public int compare(Trigger trig1, Trigger trig2) {
  Date t1 = trig1.getNextFireTime();
  Date t2 = trig2.getNextFireTime();
  if (t1 != null || t2 != null) {
   if (t1 == null) {
    return 1;
   }
   if (t2 == null) {
    return -1;
   }
   if (t1.before(t2)) {
    return -1;
   }
   if (t1.after(t2)) {
    return 1;
   }
  }
  int comp = trig2.getPriority() - trig1.getPriority();
  if (comp != 0) {
   return comp;
  }
  return trig1.getName().compareTo(trig2.getName());
 }
}
origin: org.knowm/sundial

private boolean notifyTriggerListenersComplete(JobExecutionContext jec, CompletedExecutionInstruction instCode) {
 try {
  qs.notifyTriggerListenersComplete(jec, instCode);
 } catch (SchedulerException se) {
  qs.notifySchedulerListenersError("Unable to notify TriggerListener(s) of Job that was executed: " + "(error will be ignored). trigger= "
    + jec.getTrigger().getName() + " job= " + jec.getJobDetail().getName(), se);
  return false;
 }
 if (jec.getTrigger().getNextFireTime() == null) {
  qs.notifySchedulerListenersFinalized(jec.getTrigger());
 }
 return true;
}
origin: com.xeiam/sundial

private boolean notifyTriggerListenersComplete(JobExecutionContext jec, CompletedExecutionInstruction instCode) {
 try {
  qs.notifyTriggerListenersComplete(jec, instCode);
 } catch (SchedulerException se) {
  qs.notifySchedulerListenersError("Unable to notify TriggerListener(s) of Job that was executed: " + "(error will be ignored). trigger= "
    + jec.getTrigger().getName() + " job= " + jec.getJobDetail().getName(), se);
  return false;
 }
 if (jec.getTrigger().getNextFireTime() == null) {
  qs.notifySchedulerListenersFinalized(jec.getTrigger());
 }
 return true;
}
origin: knowm/Sundial

private boolean notifyTriggerListenersComplete(
  JobExecutionContext jec, CompletedExecutionInstruction instCode) {
 try {
  qs.notifyTriggerListenersComplete(jec, instCode);
 } catch (SchedulerException se) {
  qs.notifySchedulerListenersError(
    "Unable to notify TriggerListener(s) of Job that was executed: "
      + "(error will be ignored). trigger= "
      + jec.getTrigger().getName()
      + " job= "
      + jec.getJobDetail().getName(),
    se);
  return false;
 }
 if (jec.getTrigger().getNextFireTime() == null) {
  qs.notifySchedulerListenersFinalized(jec.getTrigger());
 }
 return true;
}
org.quartz.triggersTriggergetNextFireTime

Javadoc

Returns the next time at which the Trigger is scheduled to fire. If the trigger will not fire again, null will be returned. Note that the time returned can possibly be in the past, if the time that was computed for the trigger to next fire has already arrived, but the scheduler has not yet been able to fire the trigger (which would likely be due to lack of resources e.g. threads).

The value returned is not guaranteed to be valid until after the Trigger has been added to the scheduler.

Popular methods of Trigger

  • getName
    Get the name of this Trigger.
  • getJobDataMap
    Get the JobDataMap that is associated with the Trigger. Changes made to this map during job executio
  • getJobName
    Get the name of the associated org.quartz.jobs.JobDetail.
  • getPriority
    The priority of a Trigger acts as a tiebreaker such that if two Triggers have the same scheduled fir

Popular in Java

  • Creating JSON documents from java classes using gson
  • findViewById (Activity)
  • putExtra (Intent)
  • setRequestProperty (URLConnection)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now