<p>
Delete the identified <code>Job</code> from the Scheduler - and any
associated <code>Trigger</code>s.
</p>

@return true if the Job was found and deleted.
@throws SchedulerException
if there is an internal Scheduler error.
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;
  }
666566
public boolean remove()
    {
        if (_last1.key() == null)
            throw new java.util.NoSuchElementException(
                                                      "remove() without calling next()");

        boolean result = internalRemove();

        return result;
    }
543061
public void unscheduleJob(String jobName)
      throws JobException {
    if (this.scheduledJobs.containsKey(jobName)) {
      try {
        this.scheduler.getScheduler().deleteJob(this.scheduledJobs.remove(jobName));
      } catch (SchedulerException se) {
        LOG.error("Failed to unschedule and delete job " + jobName, se);
        throw new JobException("Failed to unschedule and delete job " + jobName, se);
      }
    }
  }
342014
public boolean schedulePolling() {
        if(isDisabled())    return false;
        SCMTrigger scmt = getTrigger(SCMTrigger.class);
        if(scmt==null)      return false;
        scmt.run();
        return true;
    }
400047
def delete_job(name=None):
    '''
    

    '''
    if not name:
        raise SaltInvocationError('Required parameter \'name\' is missing')

    server = _connect()

    if not job_exists(name):
        raise CommandExecutionError('Job \'{0}\' does not exist'.format(name))

    try:
        server.delete_job(name)
    except jenkins.JenkinsException as err:
        raise CommandExecutionError(
            'Encountered error deleting job \'{0}\': {1}'.format(name, err)
        )
    return True
54351
@Override
  public synchronized void remove(URI jobURI) {
    Preconditions.checkState(state() == State.RUNNING, String.format("%s is not running.", this.getClass().getName()));
    try {
      long startTime = System.currentTimeMillis();
      JobSpec jobSpec = getJobSpec(jobURI);
      Path jobSpecPath = getPathForURI(this.jobConfDirPath, jobURI);

      if (fs.exists(jobSpecPath)) {
        fs.delete(jobSpecPath, false);
        this.mutableMetrics.updateRemoveJobTime(startTime);
        this.listeners.onDeleteJob(jobURI, jobSpec.getVersion());
      } else {
        LOGGER.warn("No file with URI:" + jobSpecPath + " is found. Deletion failed.");
      }
    } catch (IOException e) {
      throw new RuntimeException("When removing a JobConf. file, issues unexpected happen:" + e.getMessage());
    } catch (SpecNotFoundException e) {
      LOGGER.warn("No file with URI:" + jobURI + " is found. Deletion failed.");
    }
  }
455114
public function cancel()
    {
        if ($this->id === null) {
            return false;
        }

        $key = $this->queue->generateListKey();
        $id = "$key:" . $this->id;

        // Delete the job from the current and scheduled queue, then remove the job details from Redis
        $result = $this->queue->getClient()->getRedis()->multi()
            ->zrem($key)
            ->zrem($key . '-scheduled')
            ->del($id)
            ->hset(\date('Y-m-d') . '_cancel', (string)\time(), \json_encode([
                'class' => $this->getWorkerClass(),
                'args' => $this->getArgs(),
                'priority' => (float)$this->getPriority(),
                'id' => $this->getId()
            ]))
            ->exec();

        $this->workerClass = null;
        $this->args = [];
        $this->retry = null;
        $this->priority = null;

        return $result[0] === true || $result[1] === true;
    }
283918
private void removeScheduledJob(UUID jobId, boolean complete) {
    ScheduledJob sched = jobs.remove(jobId);
    if (sched != null) {
      if (complete) {
        sched.notifyComplete();
        if (logger.isInfoEnabled()) {
          logger.info("Job complete (" + jobId.toString() + ")");
        }
      } else {
        sched.notifyCancelled();
        if (logger.isInfoEnabled()) {
          logger.info("Job cancelled (" + jobId.toString() + ")");
        }
      }
      jobs.remove(jobId);
      scheduler.removeJob(jobId);
      sched.classManager.release();
    }
  }
950024
protected synchronized void purgeJob(KillJobAction action) throws IOException {
    JobID jobId = action.getJobID();
    LOG.info("Received 'KillJobAction' for job: " + jobId);
    RunningJob rjob = null;
    synchronized (runningJobs) {
      rjob = runningJobs.get(jobId);
    }

    if (rjob == null) {
      if (LOG.isDebugEnabled()) {
        // We cleanup the job on all tasktrackers in the cluster
        // so there is a good chance it never ran a single task from it
        LOG.debug("Unknown job " + jobId + " being deleted.");
      }
    } else {
      synchronized (rjob) {
        // Add this tips of this job to queue of tasks to be purged
        for (TaskInProgress tip : rjob.tasks) {
          tip.jobHasFinished(false);
          Task t = tip.getTask();
          if (t.isMapTask()) {
            indexCache.removeMap(tip.getTask().getTaskID().toString());
          }
          
          // Remove it from the runningTasks
          if (this.runningTasks.containsKey(t.getTaskID())) {
            LOG.info("Remove " + t.getTaskID() + " from runningTask by purgeJob");
            this.runningTasks.remove(t.getTaskID());
          }
        }
        // Delete the job directory for this
        // task if the job is done/failed
        if (!rjob.keepJobFiles){
          PathDeletionContext[] contexts = buildPathDeletionContexts(localFs,
              getLocalFiles(fConf, getLocalJobDir(rjob.getJobID().toString())));
          directoryCleanupThread.addToQueue(contexts);
        }
        // Remove this job
        rjob.tasks.clear();
      }
    }

    synchronized(runningJobs) {
      runningJobs.remove(jobId);
    }

  }
830052
public OperationFuture<List<LoadBalancer>> delete(List<LoadBalancer> loadBalancerList) {
        List<JobFuture> jobs =
            loadBalancerList
                .stream()
                .map(reference -> delete(reference).jobFuture())
                .collect(toList());

        return new OperationFuture<>(
            loadBalancerList,
            new ParallelJobsFuture(jobs)
        );
    }
1278126
public boolean onDelete()
    {
        if (this.getEditing() == false)
        {   // Can't delete on a disabled grid.
            String strError = "Can't Delete from disabled grid";
            if (this.getTask() != null)
                if (this.getTask().getApplication() != null)
                    strError = ((BaseApplication)this.getTask().getApplication()).getResources(ResourceConstants.ERROR_RESOURCE, true).getString(strError);
            this.displayError(strError);
            return false;
        }
        return super.onDelete();
    }
835425
public void rescheduleJob(final JobInstance toBeRescheduled) {
        final JobIdentifier jobIdentifier = toBeRescheduled.getIdentifier();
        synchronized (mutexForStageInstance(jobIdentifier)) {
            synchronized (mutexForJob(jobIdentifier)) {
                transactionTemplate.execute(new TransactionCallbackWithoutResult() {
                    @Override
                    protected void doInTransactionWithoutResult(TransactionStatus status) {
                        LOGGER.warn("[Job Reschedule] Rescheduling and marking old job as ignored: {}", toBeRescheduled);
                        //Reloading it because we want to see the latest committed state after acquiring the mutex.
                        JobInstance oldJob = jobInstanceService.buildById(toBeRescheduled.getId());
                        if (oldJob.isCompleted() || oldJob.isRescheduled()) {
                            return;
                        }
                        JobInstance newJob = oldJob.clone();
                        oldJob.changeState(JobState.Rescheduled);
                        jobInstanceService.updateStateAndResult(oldJob);

                        //Make a new Job
                        newJob.reschedule();
                        jobInstanceService.save(oldJob.getIdentifier().getStageIdentifier(), oldJob.getStageId(), newJob);

                        //Copy the plan for the old job since we don't load job plan with jobInstance by default
                        JobPlan plan = jobInstanceDao.loadPlan(oldJob.getId());
                        jobInstanceDao.ignore(oldJob);
                        jobInstanceDao.save(newJob.getId(), plan);
                        LOGGER.info("[Job Reschedule] Scheduled new job: {}. Replacing old job: {}", newJob.getIdentifier(), oldJob.getIdentifier());
                    }
                });
            }
        }
    }
402057
public boolean isScheduled(final org.easybatch.core.job.Job job) throws JobSchedulerException {
        String jobName = job.getName();
        try {
            return scheduler.checkExists(TriggerKey.triggerKey(TRIGGER_NAME_PREFIX + jobName));
        } catch (SchedulerException e) {
            throw new JobSchedulerException(format("Unable to check if the job '%s' is scheduled", jobName), e);
        }
    }
1081217
public synchronized void removeSchedule(final Schedule sched) {
    final Pair<Integer, String> identityPairMap = sched.getScheduleIdentityPair();

    final Schedule schedule = this.scheduleIdentityPairMap.get(identityPairMap);
    if (schedule != null) {
      this.scheduleIdentityPairMap.remove(identityPairMap);
    }

    this.scheduleIDMap.remove(sched.getScheduleId());

    try {
      this.loader.removeSchedule(sched);
    } catch (final ScheduleManagerException e) {
      logger.error(e);
    }
  }
673285
def rm_job(name):
    '''
    
    '''
    response = salt.utils.http.query(
        "{0}/scheduler/job/{1}".format(_base_url(), name),
        method='DELETE',
    )
    return True
759630
public void unschedule(final org.easybatch.core.job.Job job) throws JobSchedulerException {
        String jobName = job.getName();
        LOGGER.info("Unscheduling job ''{}'' ", jobName);
        try {
            scheduler.unscheduleJob(TriggerKey.triggerKey(TRIGGER_NAME_PREFIX + jobName));
        } catch (SchedulerException e) {
            throw new JobSchedulerException(format("Unable to unschedule job '%s'", jobName), e);
        }
    }
231262
public synchronized boolean resumeJobIfPresent(final String jobName, final String groupName)
      throws SchedulerException {
    if (ifJobExist(jobName, groupName)) {
      this.scheduler.resumeJob(new JobKey(jobName, groupName));
      return true;
    } else {
      return false;
    }
  }