pyinfra turns Python code into shell commands and runs them on your servers. Execute ad-hoc commands and write declarative operations. Target SSH servers, local machine and Docker containers. Fast and scales from one server to thousands.
I noticed that Crontab uses the following data structure. If a command appears twice, the old entry will get overwritten. It may has something to do with #1189, but I'm not sure
class Crontab(FactBase[Dict[str, CrontabDict]]):
"""
Returns a dictionary of cron command -> execution time.
.. code:: python
{
"/path/to/command": {
"minute": "*",
"hour": "*",
"month": "*",
"day_of_month": "*",
"day_of_week": "*",
},
"echo another command": {
"special_time": "@daily",
},
}
"""
I noticed that Crontab uses the following data structure. If a command appears twice, the old entry will get overwritten. It may has something to do with #1189, but I'm not sure
Proposal: use the new data structure
and deprecate old structure