Schedules the flow, but doesn't save the schedule afterwards.
972038
private synchronized void internalSchedule(final Schedule s) {
    this.scheduleIDMap.put(s.getScheduleId(), s);
    this.scheduleIdentityPairMap.put(s.getScheduleIdentityPair(), s);
  }
52257
final void rescheduleIfNeeded() {
		if (executeEvery > 0 && !TaskScheduler.stopping) {
			synchronized (this) {
				status = Task.STATUS_NOT_STARTED;
				executeIn(executeEvery);
			}
			TaskScheduler.schedule(this);
		} else if (nextExecution > 0 && !TaskScheduler.stopping) {
			synchronized (this) {
				this.status = Task.STATUS_NOT_STARTED;
			}
			TaskScheduler.schedule(this);
		}
	}
241536
def skip(self, sched_rule_id):
        """"""
        path = 'schedulerule/skip'
        payload = {'id': sched_rule_id}
        return self.rachio.put(path, payload)
514698
def set_flow(self, flow):
        """"""
        if not hasattr(self, "_flow"):
            self._flow = flow
        else:
            if self._flow != flow:
                raise ValueError("self._flow != flow")
1067281
private void scheduleKeepAlive() {
    if (keepAlive != null)
      keepAlive.cancel();
    keepAlive = context.schedule(interval, () -> {
      keepAlive = null;
      if (state.getState().active()) {
        keepAlive();
      }
    });
  }
1063884
def save(**kwargs):
    '''
    
    '''

    ret = {'comment': [],
           'result': True}

    if 'test' in kwargs and kwargs['test']:
        ret['comment'] = 'Schedule would be saved.'
    else:
        try:
            eventer = salt.utils.event.get_event('minion', opts=__opts__)
            res = __salt__['event.fire']({'func': 'save_schedule'}, 'manage_schedule')
            if res:
                event_ret = eventer.get_event(tag='/salt/minion/minion_schedule_saved', wait=30)
                if event_ret and event_ret['complete']:
                    ret['result'] = True
                    ret['comment'] = 'Schedule (non-pillar items) saved.'
                else:
                    ret['result'] = False
                    ret['comment'] = 'Failed to save schedule.'
        except KeyError:
            # Effectively a no-op, since we can't really return without an event system
            ret['comment'] = 'Event module not available. Schedule save failed.'
    return ret
198209
def InitFromApiFlow(self, f, cron_job_id=None):
    """"""
    if f.flow_id:
      self.run_id = f.flow_id
    elif f.urn:
      self.run_id = f.urn.Basename()
    self.started_at = f.started_at
    self.cron_job_id = cron_job_id

    flow_state_enum = api_plugins_flow.ApiFlow.State
    cron_enum = rdf_cronjobs.CronJobRun.CronJobRunStatus
    errors_map = {
        flow_state_enum.RUNNING: cron_enum.RUNNING,
        flow_state_enum.TERMINATED: cron_enum.FINISHED,
        flow_state_enum.ERROR: cron_enum.ERROR,
        flow_state_enum.CLIENT_CRASHED: cron_enum.ERROR
    }
    self.status = errors_map[f.state]

    if f.state != f.State.RUNNING:
      self.finished_at = f.last_active_at

    if f.context.kill_timestamp:
      self.status = self.Status.LIFETIME_EXCEEDED

    if f.context.HasField("status"):
      self.log_message = f.context.status

    if f.context.HasField("backtrace"):
      self.backtrace = f.context.backtrace

    return self
357874
public void reschedule(@NonNull Node<K, V> node) {
    if (node.getNextInVariableOrder() != null) {
      unlink(node);
      schedule(node);
    }
  }
335652
private synchronized void maybeRun() {
        if (inprogress==null && pending!=null) {
            base.submit(new Callable<Void>() {
                @Override
                public Void call() throws Exception {
                    synchronized (AtmostOneTaskExecutor.this) {
                        // everyone who submits after this should form a next batch
                        inprogress = pending;
                        pending = null;
                    }

                    try {
                        inprogress.set(task.call());
                    } catch (Throwable t) {
                        LOGGER.log(Level.WARNING, null, t);
                        inprogress.setException(t);
                    } finally {
                        synchronized (AtmostOneTaskExecutor.this) {
                            // if next one is pending, get that scheduled
                            inprogress = null;
                            maybeRun();
                        }
                    }
                    return null;
                }
            });
        }
    }
2719
function onProcCall(method, path /* devid , propname*/, args) {
    switch (method) {
    case 'GET':
        return onProcCallGet(method, path /* devid , propname*/, args);
    /* case 'POST' :
        if(devid!='settings' || args == undefined)
            return {error:'The format is wrong for settings.'};
        if( args.schedule instanceof Array && logger.updateschedule(args.schedule) )
            return {success:true,message:'New schedule settings are successfully saved'};
        else
            return {error:'Error in saving scheduled logging'};*/
    }
    const msg = `The specified method ${method}`
          + ' is not implemented in admin plugin.';
    return {error: msg};
}
348252
private void process(T session) {
        // Process Reads
        if (isReadable(session) && !session.isReadSuspended()) {
            read(session);
        }

        // Process writes
        if (isWritable(session) && !session.isWriteSuspended()) {
            scheduleFlush(session);
        }
    }
825535
def schedule(self, seconds: float):
        
        def wrap(func: Callable):
            self._schedules.append(Scheduler(self.app, seconds, func))
        return wrap
823298
def schedule(self, when=None, action=None, **kwargs):
        
        action = '_publish'
        super(BaseVersionedModel, self).schedule(when=when, action=action,
                                                 **kwargs)
61663
private void scheduleRebalance() {
    if (rebalanceTimer != null) {
      rebalanceTimer.cancel();
    }
    rebalanceTimer = getScheduler().schedule(REBALANCE_DURATION, this::rebalance);
  }
1138160
void afterWrite(Runnable task) {
    if (buffersWrites()) {
      for (int i = 0; i < WRITE_BUFFER_RETRIES; i++) {
        if (writeBuffer().offer(task)) {
          scheduleAfterWrite();
          return;
        }
        scheduleDrainBuffers();
      }

      // The maintenance task may be scheduled but not running due to all of the executor's threads
      // being busy. If all of the threads are writing into the cache then no progress can be made
      // without assistance.
      try {
        performCleanUp(task);
      } catch (RuntimeException e) {
        logger.log(Level.SEVERE, "Exception thrown when performing the maintenance task", e);
      }
    } else {
      scheduleAfterWrite();
    }
  }
34155
def save(cls, flow, fname):
        
        result = None
        try:
            f = open(fname, 'w')
            f.write(flow.to_json())
            f.close()
        except Exception, e:
            result = str(e)
        return result
801085
def ScheduleKillNotification(self):
    """"""
    # Create a notification for the flow in the future that
    # indicates that this flow is in progess. We'll delete this
    # notification when we're done with processing completed
    # requests. If we're stuck for some reason, the notification
    # will be delivered later and the stuck flow will get
    # terminated.
    kill_timestamp = (rdfvalue.RDFDatetime().Now() + self.stuck_flows_timeout)
    with queue_manager.QueueManager(token=self.token) as manager:
      manager.QueueNotification(
          session_id=self.session_id,
          in_progress=True,
          timestamp=kill_timestamp)

    # kill_timestamp may get updated via flow.HeartBeat() calls, so we
    # have to store it in the context.
    self.context.kill_timestamp = kill_timestamp