Codota Logo
Scheduler.addJob
Code IndexAdd Codota to your IDE (free)

How to use
addJob
method
in
org.quartz.core.Scheduler

Best Java code snippets using org.quartz.core.Scheduler.addJob (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: org.knowm/sundial

/**
 * Adds a Job to the scheduler. Replaces a matching existing Job.
 *
 * @param jobName
 * @param jobClass
 * @param params Set this null if there are no params
 * @param isConcurrencyAllowed
 */
public static void addJob(String jobName, Class<? extends Job> jobClass, Map<String, Object> params, boolean isConcurrencyAllowed)
  throws SundialSchedulerException {
 try {
  JobDataMap jobDataMap = new JobDataMap();
  if (params != null) {
   for (Entry<String, Object> entry : params.entrySet()) {
    jobDataMap.put(entry.getKey(), entry.getValue());
   }
  }
  JobDetail jobDetail = newJobBuilder(jobClass).withIdentity(jobName).usingJobData(jobDataMap).isConcurrencyAllowed(isConcurrencyAllowed).build();
  getScheduler().addJob(jobDetail);
 } catch (SchedulerException e) {
  logger.error("ERROR ADDING JOB!!!", e);
  throw new SundialSchedulerException("ERROR ADDING JOB!!!", e);
 }
}
origin: com.xeiam/sundial

logger.info("Scheduled job: {} ", jobDetail);
sched.addJob(jobDetail);
origin: org.knowm/sundial

logger.info("Scheduled job: {} ", jobDetail);
sched.addJob(jobDetail);
origin: com.xeiam/sundial

/**
 * Adds a Job to the scheduler. Replaces a matching existing Job.
 *
 * @param jobName
 * @param jobClassName
 * @param params Set this null if there are no params
 * @param isConcurrencyAllowed
 */
public static void addJob(String jobName, String jobClassName, Map<String, Object> params, boolean isConcurrencyAllowed) {
 try {
  Class<? extends Job> jobClass = getScheduler().getCascadingClassLoadHelper().loadClass(jobClassName);
  JobDataMap jobDataMap = new JobDataMap();
  if (params != null) {
   for (Entry<String, Object> entry : params.entrySet()) {
    jobDataMap.put(entry.getKey(), entry.getValue());
   }
  }
  JobDetail jobDetail = newJobBuilder(jobClass).withIdentity(jobName).usingJobData(jobDataMap).isConcurrencyAllowed(isConcurrencyAllowed).build();
  getScheduler().addJob(jobDetail);
 } catch (SchedulerException e) {
  logger.error("ERROR ADDING JOB!!!", e);
 } catch (ClassNotFoundException e) {
  logger.error("ERROR ADDING JOB!!!", e);
 }
}
origin: knowm/Sundial

logger.info("Scheduled job: {} ", jobDetail);
sched.addJob(jobDetail);
origin: knowm/Sundial

    .build();
getScheduler().addJob(jobDetail);
org.quartz.coreScheduleraddJob

Javadoc

Add the given Job to the Scheduler - with no associated Trigger. The Job will be 'dormant' until it is scheduled with a Trigger, or Scheduler.triggerJob() is called for it.

The Job must by definition be 'durable', if it is not, SchedulerException will be thrown.

Popular methods of Scheduler

  • getTrigger
    Get the Trigger instance with the given key. The returned Trigger object will be a snap-shot of the
  • deleteJob
    Delete the identified Job from the Scheduler - and any associated Triggers.
  • getCascadingClassLoadHelper
  • getCurrentlyExecutingJobs
    Return a list of JobExecutionContext objects that represent all currently executing Jobs in this Sch
  • getJobKeys
    Get the keys of all the org.quartz.jobs.JobDetails in the matching groups.
  • getTriggersOfJob
    Get all Trigger s that are associated with the identified org.quartz.jobs.JobDetail. The returned T
  • rescheduleJob
    Remove (delete) the org.quartz.triggers.OperableTrigger with the given key, and store the new given
  • scheduleJob
    Schedule the given org.quartz.triggers.OperableTrigger with the Job identified by the Trigger's sett
  • shutdown
    Halts the Scheduler's firing of Triggers, and cleans up all resources associated with the Scheduler.
  • start
    Starts the Scheduler's threads that fire Triggers. When a scheduler is first created it is in "stand
  • startDelayed
    Calls {#start()} after the indicated number of seconds. (This call does not block). This can be usef
  • triggerJob
    Trigger the identified org.quartz.jobs.JobDetail (execute it now).
  • startDelayed,
  • triggerJob,
  • unscheduleJob,
  • getListenerManager

Popular in Java

  • Making http post requests using okhttp
  • getContentResolver (Context)
  • scheduleAtFixedRate (Timer)
  • findViewById (Activity)
  • IOException (java.io)
    Signals that an I/O exception of some sort has occurred. This class is the general class of exceptio
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now