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
pull/84411/head
M Norrby 12 months ago committed by GitHub
parent c64c389007
commit cae4f90b21
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -72,33 +72,39 @@ options:
minute: minute:
description: description:
- Minute when the job should run (V(0-59), V(*), V(*/2), and so on). - Minute when the job should run (V(0-59), V(*), V(*/2), and so on).
- Cannot be combined with O(special_time).
type: str type: str
default: "*" default: "*"
hour: hour:
description: description:
- Hour when the job should run (V(0-23), V(*), V(*/2), and so on). - Hour when the job should run (V(0-23), V(*), V(*/2), and so on).
- Cannot be combined with O(special_time).
type: str type: str
default: "*" default: "*"
day: day:
description: description:
- Day of the month the job should run (V(1-31), V(*), V(*/2), and so on). - 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 type: str
default: "*" default: "*"
aliases: [ dom ] aliases: [ dom ]
month: month:
description: 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 type: str
default: "*" default: "*"
weekday: weekday:
description: 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 type: str
default: "*" default: "*"
aliases: [ dow ] aliases: [ dow ]
special_time: special_time:
description: description:
- Special time specification nickname. - Special time specification nickname.
- Cannot be combined with O(minute), O(hour), O(day), O(month) or O(weekday).
type: str type: str
choices: [ annually, daily, hourly, monthly, reboot, weekly, yearly ] choices: [ annually, daily, hourly, monthly, reboot, weekly, yearly ]
version_added: "1.3" version_added: "1.3"
@ -645,7 +651,7 @@ def main():
if special_time and \ if special_time and \
(True in [(x != '*') for x in [minute, hour, day, month, weekday]]): (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 # cannot support special_time on solaris
if special_time and platform.system() == 'SunOS': if special_time and platform.system() == 'SunOS':

Loading…
Cancel
Save