Get Information from Crontab.
Version added: 0.4.0
- Get Information from Crontab.
- https://pypi.org/project/python-crontab/
The below requirements are needed on the host that executes this module.
- python-crontab
- re
- name: get all crons for dpal user
community.missing_collection.cron_info:
list_all_crons: true
user: 'dpal'
- name: get all crons by command for dpal user (python command)
community.missing_collection.cron_info:
get_crons_by_command: true
user: 'dpal'
match_string: '.py'
- name: get all crons by comment for dpal user
community.missing_collection.cron_info:
get_crons_by_comment: true
user: 'dpal'
match_string: 'python'
- name: get all crons by time for dpal user
community.missing_collection.cron_info:
get_crons_by_time: true
user: 'dpal'
match_string: '4 16 * * *'
- name: check if given crontime is valid or not
community.missing_collection.cron_info:
validate_cron_time: true
schedule: '2 14 * * *'
Common return values are documented here, the following are the fields unique to this module:
- Davinder Pal (@116davinder) <dpsangwal@gmail.com>