tron.utils.crontab module¶
Parse a crontab entry and return a dictionary.
- class tron.utils.crontab.FieldParser¶
Bases:
objectParse and validate a field in a crontab entry.
- bounds = None¶
- get_groups(source)¶
- get_match_groups(source)¶
- get_range(min_value, max_value, step)¶
- get_value_range(match_groups)¶
- get_values(source)¶
- name = None¶
- normalize(source)¶
- parse(source)¶
- range_pattern = re.compile('\n (?P<min>\\d+|\\*) # Initial value\n (?:-(?P<max>\\d+))? # Optional max upper bound\n (?:/(?P<step>\\d+))? # Optional step increment\n ', re.VERBOSE)¶
- validate_bounds(value)¶
- class tron.utils.crontab.HourFieldParser¶
Bases:
FieldParser- bounds = (0, 24)¶
- name = 'hours'¶
- class tron.utils.crontab.MinuteFieldParser¶
Bases:
FieldParser- bounds = (0, 60)¶
- name = 'minutes'¶
- class tron.utils.crontab.MonthFieldParser¶
Bases:
FieldParser- bounds = (1, 13)¶
- month_names = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']¶
- name = 'months'¶
- normalize(month)¶
- class tron.utils.crontab.MonthdayFieldParser¶
Bases:
FieldParser- bounds = (1, 32)¶
- get_values(source)¶
- name = 'monthdays'¶
- class tron.utils.crontab.WeekdayFieldParser¶
Bases:
FieldParser- bounds = (0, 7)¶
- day_names = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat']¶
- name = 'weekdays'¶
- normalize(day_of_week)¶
- tron.utils.crontab.convert_predefined(line)¶
- tron.utils.crontab.parse_crontab(line)¶