From c4fee1b658c91afa2abdd746af6c1b4697c44b35 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Mon, 16 Dec 2019 17:50:52 -0800 Subject: [PATCH] add crontab parser --- README.md | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 90e136c8..b2ab7eb3 100755 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ jc PARSER [OPTIONS] ### Parsers - `--arp` enables the `arp` parser +- `--crontab` enables the `crontab` file parser - `--df` enables the `df` parser - `--dig` enables the `dig` parser - `--du` enables the `du` parser @@ -157,6 +158,77 @@ $ arp -a | jc --arp -p } ] ``` +### crontab +``` +$ crontab | jc --crontab -p +{ + "variables": [ + { + "name": "MAILTO", + "value": "root" + }, + { + "name": "PATH", + "value": "/sbin:/bin:/usr/sbin:/usr/bin" + }, + { + "name": "SHELL", + "value": "/bin/bash" + } + ], + "schedule": [ + { + "minute": [ + "5" + ], + "hour": [ + "10-11", + "22" + ], + "day_of_month": [ + "*" + ], + "month": [ + "*" + ], + "day_of_week": [ + "*" + ], + "command": "/var/www/devdaily.com/bin/mk-new-links.php" + }, + { + "minute": [ + "30" + ], + "hour": [ + "4/2" + ], + "day_of_month": [ + "*" + ], + "month": [ + "*" + ], + "day_of_week": [ + "*" + ], + "command": "/var/www/devdaily.com/bin/create-all-backups.sh" + }, + { + "occurrence": "yearly", + "command": "/home/maverick/bin/annual-maintenance" + }, + { + "occurrence": "reboot", + "command": "/home/cleanup" + }, + { + "occurrence": "monthly", + "command": "/home/maverick/bin/tape-backup" + } + ] +} +``` ### df ``` $ df | jc --df -p @@ -1481,7 +1553,6 @@ $ w | jc --w -p Future parsers: - nslookup - journalctl -- crontab files - /proc files - /sys files