diff options
author | M Norrby <174701+norrby@users.noreply.github.com> | 2024-12-17 18:48:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-17 18:48:58 +0100 |
commit | cae4f90b21bc40c88a00e712d28531ab0261f759 (patch) | |
tree | c170c1f82b45b8f9cff1a6787f7febaba4bf7663 | |
parent | gather_facts, fix 'smart' handling with network os and 'setup' (#84425) (diff) | |
download | ansible-cae4f90b21bc40c88a00e712d28531ab0261f759.tar.xz ansible-cae4f90b21bc40c88a00e712d28531ab0261f759.zip |
Add documentation for non-numeric cron scheduling values (#84396)
- Document vixie cron compatible non-numeric values
- State which parameters cannot be used together with special_time
-rw-r--r-- | lib/ansible/modules/cron.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/ansible/modules/cron.py b/lib/ansible/modules/cron.py index 0382aa6b26..7ee12fe8f8 100644 --- a/lib/ansible/modules/cron.py +++ b/lib/ansible/modules/cron.py @@ -72,33 +72,39 @@ options: minute: description: - Minute when the job should run (V(0-59), V(*), V(*/2), and so on). + - Cannot be combined with O(special_time). type: str default: "*" hour: description: - Hour when the job should run (V(0-23), V(*), V(*/2), and so on). + - Cannot be combined with O(special_time). type: str default: "*" day: description: - Day of the month the job should run (V(1-31), V(*), V(*/2), and so on). + - Cannot be combined with O(special_time). type: str default: "*" aliases: [ dom ] month: description: - - Month of the year the job should run (V(1-12), V(*), V(*/2), and so on). + - Month of the year the job should run (V(JAN-DEC) or V(1-12), V(*), V(*/2), and so on). + - Cannot be combined with O(special_time). type: str default: "*" weekday: description: - - Day of the week that the job should run (V(0-6) for Sunday-Saturday, V(*), and so on). + - Day of the week that the job should run (V(SUN-SAT) or V(0-6), V(*), and so on). + - Cannot be combined with O(special_time). type: str default: "*" aliases: [ dow ] special_time: description: - Special time specification nickname. + - Cannot be combined with O(minute), O(hour), O(day), O(month) or O(weekday). type: str choices: [ annually, daily, hourly, monthly, reboot, weekly, yearly ] version_added: "1.3" @@ -645,7 +651,7 @@ def main(): if special_time and \ (True in [(x != '*') for x in [minute, hour, day, month, weekday]]): - module.fail_json(msg="You must specify time and date fields or special time.") + module.fail_json(msg="You cannot combine special_time with any of the time or day/date parameters.") # cannot support special_time on solaris if special_time and platform.system() == 'SunOS': |