#NEWLINE# def _CheckTimeField( self , log ) : #NEWLINE# #INDENT# 'Validates a 5 field time spec line and logs any errors and warnings.\n\n    Args:\n      log: A LogCounter instance to record issues.\n    ' #NEWLINE# cron_time_field_names = ( 'minute' , 'hour' , 'day of month' , 'month' , 'day of week' ) #NEWLINE# cron_time_field_limits = InitCronTimeFieldLimits ( ) #NEWLINE# fsm = InitCronFSM ( ) #NEWLINE# parsed_cron_time_fields = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for field in cron_time_field_names : #NEWLINE# #INDENT# parsed_cron_time_fields [ field ] = fsm . Run ( self . time_field [ field ] ) #NEWLINE# if ( 'parser_error' in parsed_cron_time_fields [ field ] ) : #NEWLINE# #INDENT# log . LineError ( log . MSG_FIELD_PARSE_ERROR , ( 'Failed to fully parse "%s" field here: %s' % ( field , parsed_cron_time_fields [ field ] [ 'parser_error' ] ) ) ) #NEWLINE# #UNINDENT# for cron_time in parsed_cron_time_fields [ field ] [ 'cron_times' ] : #NEWLINE# #INDENT# for line_error in cron_time . GetDiagnostics ( cron_time_field_limits [ field ] ) : #NEWLINE# #INDENT# log . LineError ( log . MSG_FIELD_VALUE_ERROR , line_error ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if ChkCTStarOnly ( parsed_cron_time_fields [ 'minute' ] [ 'cron_times' ] ) : #NEWLINE# #INDENT# if ( not ChkCTStarOnly ( parsed_cron_time_fields [ 'hour' ] [ 'cron_times' ] ) ) : #NEWLINE# #INDENT# log . LineWarn ( log . MSG_HOURS_NOT_MINUTES , 'Cron will run this every minute for the hours set.' )