Resolve bean class for the schedule rule.

@param scheduleRule the schedule rule
@throws IllegalRuleException if an illegal rule is found
174735
public void resolveBeanClass(ScheduleRule scheduleRule) throws IllegalRuleException {
        String beanId = scheduleRule.getSchedulerBeanId();
        if (beanId != null) {
            Class<?> beanClass = resolveBeanClass(beanId, scheduleRule);
            if (beanClass != null) {
                scheduleRule.setSchedulerBeanClass(beanClass);
                reserveBeanReference(beanClass, scheduleRule);
            } else {
                reserveBeanReference(beanId, scheduleRule);
            }
        }
    }
1123989
@Nonnull
  public AbstractHasTopLevelRules addRule (@Nonnull final ICSSTopLevelRule aRule)
  {
    ValueEnforcer.notNull (aRule, "Rule");

    m_aRules.add (aRule);
    return this;
  }
287596
public ParsedScheduleExpression parseScheduleExpression(TimerMethodData.AutomaticTimer timer) {
        ScheduleExpression schedule = timer.getSchedule();
        String start = timer.getStart();
        String end = timer.getEnd();

        try {
            if (start != null) {
                schedule.start(parseXSDDateTime("start", start));
            }

            if (end != null) {
                schedule.end(parseXSDDateTime("end", end));
            }

            return ScheduleExpressionParser.parse(schedule);
        } catch (ScheduleExpressionParserException ex) {
            FFDCFilter.processException(ex, CLASS_NAME + ".parseScheduleExpression", "541", this);
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                Tr.debug(tc, "failed to parse schedule expression", ex);

            // Use the exception to call Tr.error().
            ex.logError(ivBMD.j2eeName.getModule(), ivBMD.j2eeName.getComponent(), timer.getMethod().getMethod().getName());
            throw ex;
        }
    }
906304
private void processRule(final Rule<RI, RO> rule, final RI data) {
        // Get result handlers matching the rule
        final List<ResultHandler<RO>> mappedResultHandlers = rulesToResultHandlers.get(rule);
        if ((mappedResultHandlers == null) || mappedResultHandlers.isEmpty()) {
            LOGGER.warn("No matching result handler in mappable validator for rule: " + rule);
        } else {
            // Check rule
            final RO result = rule.validate(data);

            // Process result with all matching result handlers
            for (final ResultHandler<RO> resultHandler : mappedResultHandlers) {
                processResultHandler(resultHandler, result);
            }
        }
    }
537047
public synchronized void schedule(ScheduledJob scheduledJob) {
    String id = scheduledJob.getId();
    String cronExpression = scheduledJob.getCronExpression();
    String name = scheduledJob.getName();

    // Validate cron expression
    if (!CronExpression.isValidExpression(cronExpression)) {
      throw new MolgenisValidationException(
          singleton(
              new ConstraintViolation("Invalid cronexpression '" + cronExpression + "'", null)));
    }

    try {
      // If already scheduled, remove it from the quartzScheduler
      if (quartzScheduler.checkExists(new JobKey(id, SCHEDULED_JOB_GROUP))) {
        unschedule(id);
      }

      // If not active, do not schedule it
      if (!scheduledJob.getBoolean(ScheduledJobMetadata.ACTIVE)) {
        return;
      }

      // Schedule with 'cron' trigger
      Trigger trigger =
          newTrigger()
              .withIdentity(id, SCHEDULED_JOB_GROUP)
              .withSchedule(cronSchedule(cronExpression))
              .build();
      schedule(scheduledJob, trigger);

      LOG.info("Scheduled Job '{}' with trigger '{}'", name, trigger);
    } catch (SchedulerException e) {
      LOG.error("Error schedule job", e);
      throw new ScheduledJobException("Error schedule job", e);
    }
  }
1167837
public static void startScheduler(int threadPoolSize, String annotatedJobsPackageName)
      throws SundialSchedulerException {

    try {
      createScheduler(threadPoolSize, annotatedJobsPackageName);
      getScheduler().start();
    } catch (SchedulerException e) {
      throw new SundialSchedulerException("COULD NOT START SUNDIAL SCHEDULER!!!", e);
    }
  }
664400
public void resolveBeanClass(ItemRule itemRule) throws IllegalRuleException {
        Iterator<Token[]> it = ItemRule.tokenIterator(itemRule);
        if (it != null) {
            while (it.hasNext()) {
                Token[] tokens = it.next();
                if (tokens != null) {
                    for (Token token : tokens) {
                        resolveBeanClass(token);
                    }
                }
            }
        }
    }
1365977
public IScheduler getScheduler (final String schedName) throws SchedulerException
  {
    final SchedulerRepository schedRep = SchedulerRepository.getInstance ();

    return schedRep.lookup (schedName);
  }
796717
<V> ElementRule<T, V> getRule(ChronoElement<V> element) {

        return this.getChronology().getRule(element);

    }
561652
@Override
	public void cacheResult(List<CPRule> cpRules) {
		for (CPRule cpRule : cpRules) {
			if (entityCache.getResult(CPRuleModelImpl.ENTITY_CACHE_ENABLED,
						CPRuleImpl.class, cpRule.getPrimaryKey()) == null) {
				cacheResult(cpRule);
			}
			else {
				cpRule.resetOriginalValues();
			}
		}
	}
208710
protected void setScheduler(CFMLEngine engine, Resource scheduleDirectory) throws PageException {
	if (scheduleDirectory == null) {
	    if (this.scheduler == null) this.scheduler = new SchedulerImpl(engine, "<?xml version=\"1.0\"?>\n<schedule></schedule>", this);
	    return;
	}

	if (!isDirectory(scheduleDirectory)) throw new ExpressionException("schedule task directory " + scheduleDirectory + " doesn't exist or is not a directory");
	try {
	    if (this.scheduler == null) this.scheduler = new SchedulerImpl(engine, this, scheduleDirectory, SystemUtil.getCharset().name());
	}
	catch (Exception e) {
	    throw Caster.toPageException(e);
	}
    }
700317
public void autoSchedulePipelinesFromRequestBuffer() {
        synchronized (autoScheduleMutex) {
            try {
                for (Entry<CaseInsensitiveString, BuildCause> entry : pipelineScheduleQueue.toBeScheduled().entrySet()) {
                    CaseInsensitiveString pipelineName = entry.getKey();
                    BuildCause buildCause = entry.getValue();

                    LOGGER.info("[Pipeline Schedule] Scheduling pipeline {} with build cause {}", pipelineName, buildCause);

                    long schedulingStartTime = System.currentTimeMillis();
                    Pipeline pipeline = schedulePipeline(pipelineName, buildCause);
                    long schedulingEndTime = System.currentTimeMillis();

                    if (pipeline != null) {
                        schedulingPerformanceLogger.scheduledPipeline(pipelineName, pipelineScheduleQueue.toBeScheduled().size(), schedulingStartTime, schedulingEndTime);
                    }
                }
            } catch (Throwable e) {
                LOGGER.error("[Pipeline Schedule] An exception occurred while scheduling the pipeline. {}", e);
            }
        }
    }
948412
public TreeRule getRule(final int level, final int order) {
    if (rules == null || rules.isEmpty()) { 
      return null;
    }
    
    TreeMap<Integer, TreeRule> rule_level = rules.get(level);
    if (rule_level == null || rule_level.isEmpty()) {
      return null;
    }
    
    return rule_level.get(order);
  }
626229
private static function isRulesClass(string $rulesClass): bool
    {
        return
            class_exists($rulesClass) === true &&
            in_array(JsonApiDataRulesInterface::class, class_implements($rulesClass)) === true;
    }
460008
public static String schedule(String schedulingPattern, Runnable task) {
		return scheduler.schedule(schedulingPattern, task);
	}
1242538
def get(self, sched_rule_id):
        """"""
        path = '/'.join(['schedulerule', sched_rule_id])
        return self.rachio.get(path)
1126839
@Inject(optional = true)
    public void addSchedulerListeners(Set<SchedulerListener> schedulerListeners) throws SchedulerException {
        for (SchedulerListener schedulerListener : schedulerListeners) {
            scheduler.getListenerManager().addSchedulerListener(schedulerListener);
        }
    }