code: public static Instant lastInstant(Instant instant, Schedule schedule) {
      final ExecutionTime executionTime = ExecutionTime.forCron(cron(schedule));
      final ZonedDateTime utcDateTime = instant.atZone(UTC);
  
      // executionTime.isMatch ignores seconds for unix cron
      // so we fail the check immediately if there is a sub-minute value
      return (instant.truncatedTo(ChronoUnit.MINUTES).equals(instant)
              && executionTime.isMatch(utcDateTime))
             ? instant
             : executionTime.lastExecution(utcDateTime)
                 .orElseThrow(IllegalArgumentException::new) // with unix cron, this should not happen
                 .toInstant();
    }
docs: Gets the last execution instant for a {@link Schedule}, relative to a given instant. If
  the given instant is exactly at an execution time of the schedule, it will be returned
  as is.
  
  <p>e.g. an hourly schedule has a last execution instant at 13:00 relative to 13:22.
  
  @param instant  The instant to calculate the last execution instant relative to
  @param schedule The schedule of executions
  @return an instant at the last execution time