code: public static void validateCronSchedule(final String cronSchedule) {
          try {
              if (StringUtils.hasText(cronSchedule)) {
                  getCronFromExpression(cronSchedule);
              }
          } catch (final IllegalArgumentException e) {
              throw new InvalidMaintenanceScheduleException(e.getMessage(), e);
          }
      }
docs: Validates the format of the maintenance window cron expression
  
  @param cronSchedule
  is a cron expression with 6 mandatory fields and 1 last
  optional field: "second minute hour dayofmonth month weekday
  year".
  
  @throws InvalidMaintenanceScheduleException
  if the cron expression doesn't have a valid quartz format.