code: @Override
    public Date scheduleJob(OperableTrigger trigger) throws SchedulerException {
  
      validateState();
  
      if (trigger == null) {
        throw new SchedulerException("Trigger cannot be null");
      }
  
      OperableTrigger trig = trigger;
  
      trig.validate();
  
      Calendar cal = null;
      if (trigger.getCalendarName() != null) {
        cal = quartzSchedulerResources.getJobStore().retrieveCalendar(trigger.getCalendarName());
        if (cal == null) {
          throw new SchedulerException("Calendar not found: " + trigger.getCalendarName());
        }
      }
      Date ft = trig.computeFirstFireTime(cal);
  
      if (ft == null) {
        throw new SchedulerException(
            "Based on configured schedule, the given trigger will never fire.");
      }
  
      quartzSchedulerResources.getJobStore().storeTrigger(trig, false);
      notifySchedulerThread(trigger.getNextFireTime().getTime());
      notifySchedulerListenersScheduled(trigger);
  
      return ft;
    }
docs: Schedule the given <code>{@link org.quartz.triggers.Trigger}</code> with the <code>Job</code>
  identified by the <code>Trigger</code>'s settings.
  
  @throws SchedulerException if the indicated Job does not exist, or the Trigger cannot be added
  to the Scheduler, or there is an internal Scheduler error.