1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-17 00:07:37 +02:00

crontab-u and history doc updates

This commit is contained in:
Kelly Brazil
2020-02-04 14:36:03 -08:00
parent 025986c51d
commit 395a99037b
3 changed files with 89 additions and 13 deletions

View File

@ -232,6 +232,82 @@ $ cat /etc/crontab | jc --crontab -p
]
}
```
### crontab-u (with user specified)
```
$ cat /etc/crontab | jc --crontab-u -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": [
"*"
],
"user": "root",
"command": "/var/www/devdaily.com/bin/mk-new-links.php"
},
{
"minute": [
"30"
],
"hour": [
"4/2"
],
"day_of_month": [
"*"
],
"month": [
"*"
],
"day_of_week": [
"*"
],
"user": "root",
"command": "/var/www/devdaily.com/bin/create-all-backups.sh"
},
{
"occurrence": "yearly",
"user": "root",
"command": "/home/maverick/bin/annual-maintenance"
},
{
"occurrence": "reboot",
"user": "root",
"command": "/home/cleanup"
},
{
"occurrence": "monthly",
"user": "root",
"command": "/home/maverick/bin/tape-backup"
}
]
}
```
### df
```
$ df | jc --df -p
@ -527,19 +603,19 @@ $ cat /etc/fstab | jc --fstab -p
$ history | jc --history -p
[
{
"line": "118",
"line": 118,
"command": "sleep 100"
},
{
"line": "119",
"line": 119,
"command": "ls /bin"
},
{
"line": "120",
"line": 120,
"command": "echo \"hello\""
},
{
"line": "121",
"line": 121,
"command": "docker images"
},
...

View File

@ -14,19 +14,19 @@ Examples:
$ history | jc --history -p
[
{
"line": "118",
"line": 118,
"command": "sleep 100"
},
{
"line": "119",
"line": 119,
"command": "ls /bin"
},
{
"line": "120",
"line": 120,
"command": "echo "hello""
},
{
"line": "121",
"line": 121,
"command": "docker images"
},
...
@ -63,7 +63,7 @@ Returns:
[
{
"line": string,
"line": integer,
"command": string
}
]

View File

@ -13,19 +13,19 @@ Examples:
$ history | jc --history -p
[
{
"line": "118",
"line": 118,
"command": "sleep 100"
},
{
"line": "119",
"line": 119,
"command": "ls /bin"
},
{
"line": "120",
"line": 120,
"command": "echo \"hello\""
},
{
"line": "121",
"line": 121,
"command": "docker images"
},
...