feat: add json format output to cron:list command
This makes it easier to parse output in a machine-readable format - such as when interacting with cron tasks via jq for writing tests.
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
> New as of 0.23.0
|
||||
|
||||
```
|
||||
cron:list <app> # List scheduled cron tasks for an app
|
||||
cron:report [<app>] [<flag>] # Display report about an app
|
||||
cron:list <app> [--format json|stdout] # List scheduled cron tasks for an app
|
||||
cron:report [<app>] [<flag>] # Display report about an app
|
||||
```
|
||||
|
||||
## Usage
|
||||
@@ -62,6 +62,16 @@ cGhwPT09cGhwIHRlc3QucGhwPT09QGRhaWx5 @daily node index.js
|
||||
cGhwPT09dHJ1ZT09PSogKiAqICogKg== * * * * * true
|
||||
```
|
||||
|
||||
The output can also be displayed in json format:
|
||||
|
||||
```shell
|
||||
dokku cron:list node-js-app --format json
|
||||
```
|
||||
|
||||
```
|
||||
[{"id":"cGhwPT09cGhwIHRlc3QucGhwPT09QGRhaWx5","app":"node-js-app","command":"node index.js","schedule":"@daily"}]
|
||||
```
|
||||
|
||||
#### Displaying reports
|
||||
|
||||
You can get a report about the cron configuration for apps using the `cron:report` command:
|
||||
|
||||
Reference in New Issue
Block a user