Delete Scheduling Block with the specified ID
321741
def delete_scheduling_block(block_id):
    """"""
    DB.delete('scheduling_block/{}'.format(block_id))

    # Add a event to the scheduling block event list to notify
    # of a deleting a scheduling block from the db
    DB.rpush('scheduling_block_events',
             json.dumps(dict(type="deleted", id=block_id)))
753598
def generate_scheduling_block_id(num_blocks, project='test'):
    """"""
    _date = strftime("%Y%m%d", gmtime())
    _project = project
    for i in range(num_blocks):
        yield '{}-{}-sbi{:03d}'.format(_date, _project, i)
522799
function updateSchedule (scheduleId, name, enabled, callback) {
  if (typeof scheduleId !== 'string') {
    throw new JError.InvalidArgumentError('Schedule ID must be set to string.')
  }
  var body = {}
  if (name != null) {
    if (typeof name !== 'string') {
      throw new JError.InvalidArgumentError('name must be set to string.')
    }
    body = JUtil.extend(body, {
      'name': name
    })
  }
  if (enabled != null) {
    if (typeof enabled !== 'boolean') {
      throw new JError.InvalidArgumentError('enabled must be set to boolean.')
    }
    body = JUtil.extend(body, {
      'enabled': enabled
    })
  }
  if (!JUtil.isEmptyObject(this.trigger)) {
    body = JUtil.extend(body, {
      'trigger': this.trigger
    })
  }
  if (!JUtil.isEmptyObject(this.payload)) {
    validate(this.payload)
    this.payload.options = JUtil.extend({
      'sendno': generateSendno(),
      'apns_production': false
    },
      this.payload.options)
    body = JUtil.extend(body, {
      'push': this.payload
    })
  }
  return this.client.updateSchedule(scheduleId, JSON.stringify(body), callback)
}
793605
def remove(self):
        
        self.zone.alarmClock.DestroyAlarm([
            ('ID', self._alarm_id)
        ])
        alarm_id = self._alarm_id
        try:
            del Alarm._all_alarms[alarm_id]
        except KeyError:
            pass
        self._alarm_id = None
686049
def unschedule(name, params):
    '''
    
    '''
    if name not in celery.tasks:
        exit_with_error('Job %s not found', name)

    args = [p for p in params if '=' not in p]
    kwargs = dict(p.split('=') for p in params if '=' in p)
    label = 'Job {0}'.format(job_label(name, args, kwargs))

    try:
        task = PeriodicTask.objects.get(task=name, args=args, kwargs=kwargs)
    except PeriodicTask.DoesNotExist:
        exit_with_error('No scheduled job match {0}'.format(label))

    task.delete()
    msg = 'Unscheduled {label} with the following crontab: {cron}'
    log.info(msg.format(label=label, cron=task.schedule_display))
631917
def remove(id_):
    
    with LOCK:
        thread = REGISTRY.pop(id_, None)
        if thread is not None:
            thread.cancel()

    return thread
16719
def manage_schedule(self, tag, data):
        '''
        
        '''
        func = data.get('func', None)
        name = data.get('name', None)
        schedule = data.get('schedule', None)
        where = data.get('where', None)
        persist = data.get('persist', None)

        funcs = {'delete': ('delete_job', (name, persist)),
                 'add': ('add_job', (schedule, persist)),
                 'modify': ('modify_job',
                            (name, schedule, persist)),
                 'enable': ('enable_schedule', ()),
                 'disable': ('disable_schedule', ()),
                 'enable_job': ('enable_job', (name, persist)),
                 'disable_job': ('disable_job', (name, persist)),
                 'postpone_job': ('postpone_job', (name, data)),
                 'skip_job': ('skip_job', (name, data)),
                 'reload': ('reload', (schedule,)),
                 'list': ('list', (where,)),
                 'save_schedule': ('save_schedule', ()),
                 'get_next_fire_time': ('get_next_fire_time',
                                        (name,))}

        # Call the appropriate schedule function
        try:
            alias, params = funcs.get(func)
            getattr(self.schedule, alias)(*params)
        except TypeError:
            log.error('Function "%s" is unavailable in salt.utils.scheduler',
                      func)
1061850
def del_downtime(self, downtime_id):
        
        if downtime_id in self.downtimes:
            self.downtimes[downtime_id].can_be_deleted = True
            del self.downtimes[downtime_id]
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);
    }
  }
248282
def delete_one(self, id_):
                
        url = "https://api.knackhq.com/v1/objects/%s/records/%s" % (
            self.key, id_)
        res = self.delete(url)
        return res
732718
def modify_job(self, name, schedule, persist=True):
        '''
        
        '''
        # ensure job exists, then replace it
        if name in self.opts['schedule']:
            self.delete_job(name, persist)
        elif name in self._get_schedule(include_opts=False):
            log.warning("Cannot modify job %s, it's in the pillar!", name)
            return

        self.opts['schedule'][name] = schedule

        if persist:
            self.persist()
880396
private void updateOnRemoveBlock(long blockId) {
    synchronized (mBlockIdToLastUpdateTime) {
      mLogicTimeCount.incrementAndGet();
      mBlockIdToCRFValue.remove(blockId);
      mBlockIdToLastUpdateTime.remove(blockId);
    }
  }
661734
def delete_rule!(objectID, forward_to_replicas = false, request_options = {})
      res = delete_rule(objectID, forward_to_replicas, request_options)
      wait_task(res['taskID'], WAIT_TASK_DEFAULT_TIME_BEFORE_RETRY, request_options)
      return res
    end
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();
    }
  }
1317953
def delete(self, id):
        
        try:
            response = yield self.client.delete(id)

            if response.get("n") > 0:
                self.write({"message": "Deleted %s object: %s" % (self.object_name, id) })
                return

            self.raise_error(404, "Resource not found")

        except InvalidId as ex:
            self.raise_error(400, message="Your ID is malformed: %s" % id)
        except:
            self.raise_error()

        self.finish()
132281
def delete(self, **kwargs):
        """"""
        url_str = self.base_url + '/%s' % kwargs['alarm_id']
        resp = self.client.delete(url_str)
        return resp
890628
public void deleteJob( String jobId ) throws SchedulerWsException {

		this.logger.finer( "Deleting scheduled job: " + jobId  );

		WebResource path = this.resource.path( UrlConstants.SCHEDULER ).path( jobId );
		ClientResponse response = this.wsClient.createBuilder( path )
						.accept( MediaType.APPLICATION_JSON )
						.delete( ClientResponse.class );

		handleResponse( response );
	}