Deletes cron job runs for a given job id.
481151
def DeleteOldCronJobRuns(self, cutoff_timestamp):
    """"""
    deleted = 0
    for run in list(itervalues(self.cronjob_runs)):
      if run.timestamp < cutoff_timestamp:
        del self.cronjob_runs[(run.cron_job_id, run.run_id)]
        deleted += 1

    return deleted
340131
def destroy(self):
        """"""
        if self.id is not None and self._mumps_c is not None:
            self.id.job = -2 # JOB_END
            self._mumps_c(self.id)
        self.id = None
        self._refs = None
703941
def delete(self, run_id):
        
        self.generic_dao.delete_record(
            self.metrics_collection_name,
            {"run_id": self._parse_run_id(run_id)})
750022
function excuteJob(){
  let job = peekNextJob();
  let nextJob;

  while(!!job && (job.excuteTime()-Date.now())<accuracy){
    job.run();
    queue.pop();

    let nextTime = job.nextTime();

    if(nextTime === null){
      delete map[job.id];
    }else{
      queue.offer({id:job.id, time: nextTime});
    }
    job = peekNextJob();
  }

  //If all the job have been canceled
  if(!job)
    return;

  //Run next schedule
  setTimer(job);
}
90054
private void purgeDeadJobInstances(DbConn cnx, Node node)
    {
        for (JobInstance ji : JobInstance.select(cnx, "ji_select_by_node", node.getId()))
        {
            try
            {
                cnx.runSelectSingle("history_select_state_by_id", String.class, ji.getId());
            }
            catch (NoResultException e)
            {
                History.create(cnx, ji, State.CRASHED, Calendar.getInstance());
                Message.create(cnx,
                        "Job was supposed to be running at server startup - usually means it was killed along a server by an admin or a crash",
                        ji.getId());
            }

            cnx.runUpdate("ji_delete_by_id", ji.getId());
        }
        cnx.commit();
    }
442862
public void purgeJob(final HadoopJob job) {
    runningJobs.remove(job.getJobID());
    Display.getDefault().asyncExec(new Runnable() {
      public void run() {
        fireJobRemoved(job);
      }
    });
  }
663966
public function removeJob($id = null) {
		$this->request->allowMethod('post');
		$queuedJob = $this->QueuedJobs->get($id);

		$this->QueuedJobs->delete($queuedJob);

		$this->Flash->success('Job # ' . $id . ' deleted');

		return $this->redirect(['action' => 'index']);
	}
931637
public function delete(Job $job)
    {
        $this->pheanstalk->delete($job);

        $this->logJob($job->getId(), 'Job deleted');
    }
691680
def cancel(self, job_ids):
        ''' 
        '''

        for job in job_ids:
            logger.debug("Terminating job/proc_id : {0}".format(job))
            # Here we are assuming that for local, the job_ids are the process id's
            proc = self.resources[job]['proc']
            os.killpg(os.getpgid(proc.pid), signal.SIGTERM)
            self.resources[job]['status'] = 'CANCELLED'
        rets = [True for i in job_ids]

        return rets
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();
    }
  }
1157594
def cancel_job(self, job_id=None, job_name=None):
        
        return self._delegator.cancel_job(job_id=job_id, job_name = job_name)
1219926
public function deleteAction($id)
    {
        $em = $this->getDoctrine()->getManager();
        $cron = $em->getRepository('OpiferCmsBundle:Cron')->find($id);

        $em->remove($cron);
        $em->flush();

        return $this->redirectToRoute('opifer_cms_cronjob_index');
    }
51512
private function removeJobs()
    {
        foreach ($this->cronjobs as $jobName => $jobConfig) {
            // remove schedule in case it changed after being installed
            unset($jobConfig['schedule']);
            $this->scheduler->removeJob($jobName, $jobConfig);
        }
    }
1180056
async def delCronJob(self, iden):
        '''
        
        '''
        cron = self.cell.agenda.appts.get(iden)
        if cron is None:
            raise s_exc.NoSuchIden()
        self._trig_auth_check(cron.useriden)
        await self.cell.agenda.delete(iden)
202607
def stop_job(self, job_id, array_id = None):
    """"""
    self.lock()

    job, array_job = self._job_and_array(job_id, array_id)
    if job is not None:
      if job.status in ('executing', 'queued', 'waiting'):
        logger.info("Reset job '%s' (%s) in the database", job.name, self._format_log(job.id))
        job.status = 'submitted'

      if array_job is not None and array_job.status in ('executing', 'queued', 'waiting'):
        logger.debug("Reset array job '%s' in the database", array_job)
        array_job.status = 'submitted'
      if array_job is None:
        for array_job in job.array:
          if array_job.status in ('executing', 'queued', 'waiting'):
            logger.debug("Reset array job '%s' in the database", array_job)
            array_job.status = 'submitted'

    self.session.commit()
    self.unlock()
124846
def delete_tag_from_job(user, job_id, tag_id):
    """"""

    _JJT = models.JOIN_JOBS_TAGS
    job = v1_utils.verify_existence_and_get(job_id, _TABLE)
    if not user.is_in_team(job['team_id']):
        raise dci_exc.Unauthorized()
    v1_utils.verify_existence_and_get(tag_id, models.TAGS)

    query = _JJT.delete().where(sql.and_(_JJT.c.tag_id == tag_id,
                                         _JJT.c.job_id == job_id))

    try:
        flask.g.db_conn.execute(query)
    except sa_exc.IntegrityError:
        raise dci_exc.DCICreationConflict('tag', 'tag_id')

    return flask.Response(None, 204, content_type='application/json')
705417
def delete(self):
        
        logger.debug('Deleting Dagobah instance with ID {0}'.format(self.dagobah_id))
        self.jobs = []
        self.created_jobs = 0
        self.backend.delete_dagobah(self.dagobah_id)