Crontab Facts¶
crontab.Crontab
¶
host.get_fact(Crontab, user=None)
Returns a dictionary of CrontabFile.
# CrontabFile.items()
{
"/path/to/command": {
"minute": "*",
"hour": "*",
"month": "*",
"day_of_month": "*",
"day_of_week": "*",
},
"echo another command": {
"special_time": "@daily",
},
}
# or CrontabFile.to_json()
[
{
"command": "/path/to/command",
"minute": "*",
"hour": "*",
"month": "*",
"day_of_month": "*",
"day_of_week": "*",
},
{
"command": "echo another command",
"special_time": "@daily",
}
]