Start the given schedule record (no time checks are made by this method, task will be started as is)

		:param record: schedule record to start

		:return: None
543888
def exec(self, record):
		
		watchdog_cls = self.watchdog_class()
		watchdog = watchdog_cls.create(record, self)
		watchdog.start()
		watchdog.start_event().wait(self.__watchdog_startup_timeout__)
		self.__running_registry.append(watchdog)
985436
def emit(self, record):
        
        # if we've already processed this record, ignore it
        if record in self._recordQueue:
            return
        
        name = record.name
        lvl = self.loggerLevel(name)
        
        # don't process this log
        if lvl > record.levelno:
            return
        
        self._recordQueue.insert(0, record)
        self._recordQueue = self._recordQueue[:10]
        
        # emit the change
        super(XLogRecordHandler, self).emit(record)
966495
def handle(self, record):
        
        record = self.prepare(record)
        for handler in self.handlers:
            handler(record)
81968
public void start() {
		if ((schedulerThread == null || !schedulerThread.isAlive()) && interval > 0) {
			schedulerThread = new Thread(this);
			//act as internal request to be able to bind internal process
//			Request currentRequest = application.getCurrentRequest();
//			currentRequest.startRepresentingRequest(initialRequest);
//			application.bindInternalProcess(schedulerThread, "scheduler");
//			currentRequest.stopRepresentingRequest();
			schedulerThread.start();
			System.out.println(new LogEntry("scheduler thread started..."));
		}
	}
1188146
def job_started(self, job, queue):
        
        job.hmset(start=str(datetime.utcnow()), status=STATUSES.RUNNING)
        job.tries.hincrby(1)
        self.log(self.job_started_message(job, queue))
        if hasattr(job, 'on_started'):
            job.on_started(queue)
257838
private boolean taskShouldExecute(Task task, TaskRecord taskRecord) {
        String taskID = taskRecord.getTaskID();
        if (taskRecord.getStatus() == TaskStatus.NEVER_EXECUTED) {
            m_logger.debug("Task '{}' has never executed", taskID);
            return true;
        }
        if (taskRecord.getStatus() == TaskStatus.IN_PROGRESS) {
            m_logger.debug("Task '{}' is already being executed", taskID);
            return false;
        }
        
        Calendar startTime = taskRecord.getTime(TaskRecord.PROP_START_TIME);
        long startTimeMillis = startTime == null ? 0 : startTime.getTimeInMillis();
        long taskPeriodMillis = task.getTaskFreq().getValueInMinutes() * 60 * 1000;
        long nowMillis = System.currentTimeMillis();
        boolean bShouldStart = startTimeMillis + taskPeriodMillis <= nowMillis;
        m_logger.debug("Considering task {}: Last started at {}; periodicity in millis: {}; current time: {}; next start: {}; should start: {}",
                      new Object[]{task.getTaskID(),
                                   Utils.formatDateUTC(startTimeMillis, Calendar.MILLISECOND),
                                   taskPeriodMillis,
                                   Utils.formatDateUTC(nowMillis, Calendar.MILLISECOND),
                                   Utils.formatDateUTC(startTimeMillis + taskPeriodMillis, Calendar.MILLISECOND),
                                   bShouldStart});
        return bShouldStart;
    }
591160
private void sendRecordStartNotify() {
        Status recordStatus = new Status(StatusCodes.NS_RECORD_START);
        recordStatus.setClientid(getStreamId());
        recordStatus.setDetails(getPublishedName());

        StatusMessage startMsg = new StatusMessage();
        startMsg.setBody(recordStatus);
        pushMessage(startMsg);
    }
746771
def emit(self, record):
        
        data = copy.deepcopy(self.defaults)
        data["message"] = self.format(record)
        try:
            self.provider.notify(raise_on_errors=True, **data)
        except Exception:
            self.handleError(record)
736181
public void init(Rec record)
    {
        m_objCurrentKey = null;
        m_mDataMap = new TreeMap<Object,Object>();
        m_iCurrentRecord = -1;
        m_iterator = null;
    }
906945
def emit(self, record):
		
		now = time.time()
		current_name = self.get_filename(now)
		try:
			if not self.stream.name == current_name:
				self._use_file(current_name)
		except AttributeError:
			# a stream has not been created, so create one.
			self._use_file(current_name)
		logging.StreamHandler.emit(self, record)
241857
def run(self, schedule_id, **kwargs):
        
        log = self.get_logger(**kwargs)

        try:
            schedule = Schedule.objects.get(id=schedule_id)
        except Schedule.DoesNotExist:
            log.error("Missing Schedule %s", schedule_id, exc_info=True)

        if schedule.scheduler_schedule_id is None:
            # Create the new schedule
            result = self.scheduler.create_schedule(schedule.scheduler_format)
            schedule.scheduler_schedule_id = result["id"]
            # Disable update signal here to avoid calling twice
            post_save.disconnect(schedule_saved, sender=Schedule)
            schedule.save(update_fields=("scheduler_schedule_id",))
            post_save.connect(schedule_saved, sender=Schedule)

            log.info(
                "Created schedule %s on scheduler for schedule %s",
                schedule.scheduler_schedule_id,
                schedule.id,
            )
        else:
            # Update the existing schedule
            result = self.scheduler.update_schedule(
                str(schedule.scheduler_schedule_id), schedule.scheduler_format
            )
            log.info(
                "Updated schedule %s on scheduler for schedule %s",
                schedule.scheduler_schedule_id,
                schedule.id,
            )
1169168
public void start() {
    if (scheduler == null) {
      if (enabled) {
        Scheduler.Options options = new Scheduler.Options()
            .withFrequency(Scheduler.Policy.FIXED_DELAY, frequency)
            .withInitialDelay(frequency)
            .withStopOnFailure(false);
        scheduler = new Scheduler(this, "spectator-reg-stateless", 1);
        scheduler.schedule(options, this::collectData);
        logger.info("started collecting metrics every {} reporting to {}", frequency, uri);
        logger.info("common tags: {}", commonTags);
      } else {
        logger.info("publishing is not enabled");
      }
    } else {
      logger.warn("registry already started, ignoring duplicate request");
    }
  }
358208
def run(self, records):
        
        self_name = type(self).__name__
        for i, batch in enumerate(grouper(records, self.BATCH_SIZE, skip_missing=True), 1):
            self.logger.info('%s processing batch %d', self_name, i)
            try:
                for j, proc_batch in enumerate(grouper(
                        process_records(batch).iteritems(), self.BATCH_SIZE, skip_missing=True), 1):
                    self.logger.info('%s uploading chunk #%d (batch %d)', self_name, j, i)
                    self.upload_records({k: v for k, v in proc_batch}, from_queue=True)
            except Exception:
                self.logger.exception('%s could not upload batch', self_name)
                return
            self.logger.info('%s finished batch %d', self_name, i)
            self.processed_records(batch)
        self.logger.info('%s finished', self_name)
833634
def start(pipeline)
      raise InvalidPipelineError.new("Invalid pipeline") unless pipeline.is_a?(Pipeline::Base)
      pipeline.save! if pipeline.new_record?
      Delayed::Job.enqueue(pipeline)
      pipeline.id
    end
1288121
def _create_record(self, rtype, name, content):
        """"""
        if not self._list_records(rtype, name, content):
            self._update_records([{}], {
                'type': rtype,
                'hostname': self._relative_name(name),
                'destination': content,
                'priority': self._get_lexicon_option('priority'),
            })
        LOGGER.debug('create_record: %s', True)
        return True
267677
def _update_log_record(self, record):
    
    if not hasattr(record, 'hostname'):
        record.hostname = '-'
    if not hasattr(record, 'job_id'):
        record.job_id = self.job_id
1260624
def start(self):
        
        if self._started:
            raise RuntimeError("thread already started")

        def run():
            try:
                self.run(*self._args, **self._kwargs)
            except SystemExit:
                # only shut down the thread, not the whole process
                pass
            finally:
                self._deactivate()

        self._glet = scheduler.greenlet(run)
        self._ident = id(self._glet)
        scheduler.schedule(self._glet)
        self._activate()