def _CheckTimeField(self, log):
    cron_time_field_names = ('minute', 'hour', 'day of month',
                             'month', 'day of week')
    cron_time_field_limits = InitCronTimeFieldLimits()
    fsm = InitCronFSM()

    # Check the first five fields individually.
    parsed_cron_time_fields = {}
    for field in cron_time_field_names:
      parsed_cron_time_fields[field] = fsm.Run(self.time_field[field])
      if 'parser_error' in parsed_cron_time_fields[field]:
        log.LineError(log.MSG_FIELD_PARSE_ERROR,
                      'Failed to fully parse "%s" field here: %s'
                      % (field,
                         parsed_cron_time_fields[field]['parser_error']))
      # Check the time field according to the cron_time_fields[field] rules.
      for cron_time in parsed_cron_time_fields[field]['cron_times']:
        for line_error in (cron_time.
                           GetDiagnostics(cron_time_field_limits[field])):
          log.LineError(log.MSG_FIELD_VALUE_ERROR, line_error)

    # Check the first five fields collectively.
    if ChkCTStarOnly(parsed_cron_time_fields['minute']['cron_times']):
      if not ChkCTStarOnly(parsed_cron_time_fields['hour']['cron_times']):
        log.LineWarn(log.MSG_HOURS_NOT_MINUTES,
                     'Cron will run this every minute for the hours set.')
Validates a 5 field time spec line and logs any errors and warnings.
dataset/ETHPy150Open lyda/chkcrontab/chkcrontab_lib.py/CronLineTime._CheckTimeField