Schedules an event for execution

 @param event [ScheduledEvent]
340919
def reschedule(event)
            # Check promise is not resolved
            return if event.resolved?

            @critical.synchronize {
                # Remove the event from the scheduled list and ensure it is in the schedules set
                if @schedules.include?(event)
                    remove(event)
                else
                    @schedules << event
                end

                # optimal algorithm for inserting into an already sorted list
                Bisect.insort(@scheduled, event)

                # Update the timer
                check_timer
            }
        end
805566
function make_event(event, target) {
  return string_p(event)?  Event.make(event, target)
  :      /* otherwise */   event }
1177617
void scheduleInitializationDone() {

        Scheduler.get().scheduleDeferred(new ScheduledCommand() {

            public void execute() {

                m_initialized = true;
                if (m_active) {
                    removeEditorDisabledStyle();
                } else {
                    setEditorDisabledStyle();
                }
            }
        });
    }
151486
function TimedEvent(start) {
    tr.model.Event.call(this);
    this.start = start;
    this.duration = 0;
    this.cpuStart = undefined;
    this.cpuDuration = undefined;
  }
416123
protected void scheduleEvent(final Event event, final long delay, final long period) {
        final Timer timer = new Timer();
        timer.schedule(new ScheduleEvent().event(event), delay, period);
        timers.add(timer);
    }
826734
public function runEvent($event)
    {
        $this->line('<info>Running scheduled command:</info> '.$event->getSummaryForDisplay());
        $event->run($this->laravel);
        $this->eventsRan = true;
    }
478672
@Reference(service = ScheduledEventService.class,
               cardinality = ReferenceCardinality.MANDATORY)
    protected void setScheduledEventService(ScheduledEventService ref) {
        this.scheduler = ref;
    }
62114
def on_event(self, event):
        
        self._queue.append((event))
        if not self._active and self.plot.document:
            self.plot.document.add_timeout_callback(self.process_on_event, 50)
            self._active = True
49787
def update_event(self, event, uid):
        
        ev_for_change = self.calendar.get(uid)
        ev_for_change.content = event
        ev_for_change.save()
669371
@MainThread
    private void scheduleFailureCallbacks(Event event, EventFailure failure) {
        // Sending failure callback for explicit handlers of given event
        for (EventTarget target : targets) {
            for (EventMethod method : target.methods) {
                if (event.getKey().equals(method.eventKey)
                        && method.type == EventMethod.Type.FAILURE) {
                    Utils.log(event.getKey(), method, "Scheduling failure callback");
                    executionQueue.add(Task.create(this, target, method, event, failure));
                }
            }
        }

        // Sending failure callback to general handlers (with no particular event key)
        for (EventTarget target : targets) {
            for (EventMethod method : target.methods) {
                if (EventsParams.EMPTY_KEY.equals(method.eventKey)
                        && method.type == EventMethod.Type.FAILURE) {
                    Utils.log(event.getKey(), method, "Scheduling general failure callback");
                    executionQueue.add(Task.create(this, target, method, event, failure));
                }
            }
        }
    }
785995
function (event) {
        var self = this;

        event.monologued = false;
        event.recorded_at = new Date();

        self.events.insert(event, function (err) {
          if (!err) {
            _.delay(function () {
              self.events.remove({
                event_id: event.event_id
              });
            }, 60000);
          }
        });
      }
878769
def on(event, &proc)
      unless @events.has_key? event
        raise Error, "`#{event}` is not a valid event type"
      end
      event_id = new_event_key
      @events[event][event_id] = proc
      EventDescriptor.new(event, event_id)
    end
1247526
private static void fireMissingEvent() {
        if (delayCheckSignaled) {
            // already going...
            return;
        }
        ScheduledEventService scheduler = CHFWBundle.getScheduleService();
        if (null != scheduler) {
            delayCheckSignaled = true;
            ChannelFrameworkImpl cf = (ChannelFrameworkImpl) ChannelFrameworkFactory.getChannelFramework();
            scheduler.schedule(CHFWEventHandler.EVENT_CHECK_MISSING,
                               cf.getMissingConfigDelay(), TimeUnit.MILLISECONDS);
        }
    }
108010
private void dispatchEditEvent(MessageEditEvent event) {
        Optional<Server> optionalServer =
                event.getChannel().asServerChannel().map(ServerChannel::getServer);
        api.getEventDispatcher().dispatchMessageEditEvent(
                optionalServer.map(DispatchQueueSelector.class::cast).orElse(api),
                event.getMessageId(),
                optionalServer.orElse(null),
                event.getChannel(),
                event);
    }
227987
public void time(Runnable event) {
        long startTime = this.clock.getTick();
        try {
            event.run();
        } finally {
            update(this.clock.getTick() - startTime);
        }
    }
1028889
public void deliverEvent(AbstractTaskEvent event) {

		synchronized (this.subscriptions) {

			List<EventListener> subscribers = this.subscriptions.get(event.getClass());
			if (subscribers == null) {
				return;
			}

			final Iterator<EventListener> it = subscribers.iterator();
			while (it.hasNext()) {
				it.next().eventOccurred(event);
			}
		}
	}
47999
function execute(event, config) {
    let {
        fn, context, args
    } = config,
    params = [event].concat(args);

    fn.apply(context || null, params);
}