<p>
Trigger the identified <code>{@link org.quartz.Job}</code> (execute it
now) - with a non-volatile trigger.
</p>

@param Key   $jobKey
@param array $jobDataMap
322609
public function triggerJob(Key $jobKey, array $jobDataMap = [])
    {
        $trigger = TriggerBuilder::newTrigger()->forJobKey($jobKey)->build();
        $trigger->setJobDataMap($jobDataMap);
        $trigger->computeFirstFireTime();

        $this->store->storeTrigger($trigger);

        $this->notify(Event::JOB_SCHEDULED, new TriggerEvent($trigger));
    }
586849
public void read_lock( Key<Job> job_key ) { 
    if( _key != null ) {
      Log.debug("shared-read-lock "+_key+" by job "+job_key);
      new ReadLock(job_key).invoke(_key); 
    }
  }
514978
protected function doRemoveTrigger(Key $triggerKey)
    {
        if (false == $trigger = $this->retrieveTrigger($triggerKey)) {
            return false;
        }

        $result = $this->res->getTriggerStorage()->delete($trigger);

        $removedTrigger = true;
        if (false == $result->isAcknowledged() || false == $result->getDeletedCount()) {
            $removedTrigger = false;
        }

        $jobKey = $trigger->getJobKey();
        $job = $this->retrieveJob($jobKey);

        if ($job && false == $job->isDurable()) {
            $numTriggers = $this->res->getTriggerStorage()->count([
                'jobName' => $jobKey->getName(),
                'jobGroup' => $jobKey->getGroup(),
            ]);

            if ($numTriggers == 0) {
                // Don't call removeJob() because we don't want to check for triggers again.
                $this->res->getJobStorage()->delete($job);
            }
        }

        return $removedTrigger;
    }
1199919
public void execute(JobExecutionContext context) throws JobExecutionException {

    JobDataMap dataMap = context.getJobDetail().getJobDataMap();
    OutputInvoker outputInvoker = (OutputInvoker)dataMap.get(OutputQuartzHelper.OUTPUT_JOB_NAME);

    if (outputInvoker != null) {
      // execute MP's output method
      outputInvoker.invokeOutput();
    } else {
      logger.warn("outputInvoker is NULL");
    }
  }
285019
public function pauseJob(Key $jobKey)
    {
        $this->store->pauseJob($jobKey);

        $this->notify(Event::JOB_PAUSED, new KeyEvent($jobKey));
    }
985235
protected function doResumeTrigger(Key $triggerKey)
    {
        if (false == $trigger = $this->retrieveTrigger($triggerKey)) {
            return;
        }

        if (false == $trigger->getNextFireTime()) {
            return;
        }

        $misfired = false;
        if (((int) $trigger->getNextFireTime()->format('U')) < time()) {
            $misfired = $this->updateMisfiredTrigger($triggerKey, Trigger::STATE_WAITING);
        }

        if (false == $misfired) {
            $trigger->setState(Trigger::STATE_WAITING);
            $result = $this->res->getTriggerStorage()->update($trigger);

            if (false == $result->isAcknowledged() || false == $result->getModifiedCount()) {
                throw new JobPersistenceException(sprintf('Couldn\'t resume trigger: "%s"', $triggerKey));
            }
        }
    }
25421
@Override
  public void triggerJob(String jobKey, JobDataMap data) throws SchedulerException {

    validateState();

    OperableTrigger operableTrigger =
        simpleTriggerBuilder()
            .withIdentity(jobKey + "-trigger")
            .forJob(jobKey)
            .startAt(new Date())
            .build();

    //    OperableTrigger operableTrigger = TriggerBuilder.newTriggerBuilder().withIdentity(jobKey +
    // "-trigger").forJob(jobKey)
    //
    // .withTriggerImplementation(SimpleScheduleBuilder.simpleScheduleBuilderBuilder().instantiate()).startAt(new Date()).build();

    // TODO what does this accomplish??? Seems to sets it's next fire time internally
    operableTrigger.computeFirstFireTime(null);

    if (data != null) {
      operableTrigger.setJobDataMap(data);
    }

    boolean collision = true;
    while (collision) {
      try {
        quartzSchedulerResources.getJobStore().storeTrigger(operableTrigger, false);
        collision = false;
      } catch (ObjectAlreadyExistsException oaee) {
        operableTrigger.setName(newTriggerId());
      }
    }

    notifySchedulerThread(operableTrigger.getNextFireTime().getTime());
    notifySchedulerListenersScheduled(operableTrigger);
  }
777287
public boolean deleteJob (final JobKey jobKey) throws SchedulerException
  {
    validateState ();

    boolean result = false;

    final ICommonsList <? extends ITrigger> triggers = getTriggersOfJob (jobKey);
    for (final ITrigger trigger : triggers)
    {
      if (!unscheduleJob (trigger.getKey ()))
      {
        final StringBuilder sb = new StringBuilder ().append ("Unable to unschedule trigger [")
                                                     .append (trigger.getKey ())
                                                     .append ("] while deleting job [")
                                                     .append (jobKey)
                                                     .append ("]");
        throw new SchedulerException (sb.toString ());
      }
      result = true;
    }

    result = m_aResources.getJobStore ().removeJob (jobKey) || result;
    if (result)
    {
      notifySchedulerThread (0L);
      notifySchedulerListenersJobDeleted (jobKey);
    }
    return result;
  }
150712
public function resumeTrigger(Key $triggerKey)
    {
        $this->store->resumeTrigger($triggerKey);

        $this->notify(Event::TRIGGER_RESUMED, new KeyEvent($triggerKey));
    }
643544
@Override
	public List<? extends Trigger> getTriggers(JobKey jobKey) throws SchedulerException {
		List<Trigger> triggers = new ArrayList<>();
		if (!CollectionUtils.isEmpty(scheduler.getTriggersOfJob(jobKey))) {
			triggers.addAll(scheduler.getTriggersOfJob(jobKey));
			Collections.sort(triggers, new Comparator<Trigger>() {
				@Override
				public int compare(Trigger o1, Trigger o2) {
					return o1.getKey().compareTo(o2.getKey());
				}
			});
		}
		return triggers;
	}
997100
private void runJobLauncherLoop() throws JobException {
    try {
      while (true) {
        currentJobLauncher = this.jobScheduler.buildJobLauncher(jobProps);
        // in "run once" case, job scheduler will remove current job from the scheduler
        boolean isEarlyStopped = this.jobScheduler.runJob(jobProps, jobListener, currentJobLauncher);
        boolean isRetriggerEnabled = this.isRetriggeringEnabled();
        if (isEarlyStopped && isRetriggerEnabled) {
          log.info("Job {} will be re-triggered.", jobProps.getProperty(ConfigurationKeys.JOB_NAME_KEY));
        } else {
          break;
        }
        currentJobLauncher = null;
      }
    } catch (Exception e) {
      log.error("Failed to run job {}", jobProps.getProperty(ConfigurationKeys.JOB_NAME_KEY), e);
      throw new JobException("Failed to run job " + jobProps.getProperty(ConfigurationKeys.JOB_NAME_KEY), e);
    }
  }
40266
public void pauseTrigger (final TriggerKey triggerKey) throws SchedulerException
  {
    validateState ();

    m_aResources.getJobStore ().pauseTrigger (triggerKey);
    notifySchedulerThread (0L);
    notifySchedulerListenersPausedTrigger (triggerKey);
  }
345273
public void executeDirectly(String jobId) {

        final CmsScheduledJobInfo jobInfo = (CmsScheduledJobInfo)getJob(jobId).clone();
        if (jobInfo == null) {
            LOG.error(Messages.get().getBundle().key(Messages.LOG_INVALID_JOB_1, "null"));
            return;
        }
        Thread thread = new Thread() {

            /**
             * @see java.lang.Thread#run()
             */
            @Override
            public void run() {

                executeJob(jobInfo);
            }
        };
        thread.start();
    }
1350969
@Nonnull
  public TriggerBuilder <T> forJob (@Nonnull final IJobDetail jobDetail)
  {
    final JobKey k = jobDetail.getKey ();
    if (k.getName () == null)
      throw new IllegalArgumentException ("The given job has not yet had a name assigned to it.");
    m_aJobKey = k;
    return this;
  }
554531
@SuppressWarnings("unchecked")
	protected void fireEntryAdded(K key, V value) {
		if (this.listeners != null) {
			for (final DMapListener<? super K, ? super V> listener : this.listeners.getListeners(DMapListener.class)) {
				listener.entryAdded(key, value);
			}
		}
	}
624645
private static void setJobName(Map<String,String> map, String jobName) {
		map.put(JOB_NAME_KEY, jobName);
	}
116332
public function handle(Job $job, array $data)
    {
        $event = unserialize($data['event']);

        if (method_exists($event, 'broadcastAs')) {
            $name = $event->broadcastAs();
        } else {
            $name = get_class($event);
        }

        if (! is_array($channels = $event->broadcastOn())) {
            $channels = array($channels);
        }

        $this->broadcaster->broadcast(
            $channels, $name, $this->getPayloadFromEvent($event)
        );

        $job->delete();
    }