crontoc

command module
v0.0.0-...-4f908e2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2018 License: MIT Imports: 10 Imported by: 0

README

crontoc

Show crontab lines with next execution time.

Installation

$ go get -u github.com/ariarijp/crontoc

Usage

$ crontab -l
# m h  dom mon dow   command
* * * * * vmstat >> /tmp/vmstat.log
10 0 * * * df -h >> /tmp/df.log
*/5 0 * * * free >> /tmp/free.log
0 10 1 * * date >> /tmp/date.log
$ crontoc --help
Usage of crontoc:
  -from string
    	Show TOC from its time. (default "2017-10-10T21:58:34")
  -sort
    	Sort by next execution time.
$ crontab -l | crontoc
Next: 2017-09-19 23:33:00 +0900 JST # * * * * * vmstat >> /tmp/vmstat.log
Next: 2017-09-20 00:10:00 +0900 JST # 10 0 * * * df -h >> /tmp/df.log
Next: 2017-09-20 00:00:00 +0900 JST # */5 0 * * * free >> /tmp/free.log
Next: 2017-10-01 10:00:00 +0900 JST # 0 10 1 * * date >> /tmp/date.log
$ crontab -l | crontoc -sort
2017-09-19 23:35:00 +0900 JST # * * * * * vmstat >> /tmp/vmstat.log
2017-09-20 00:00:00 +0900 JST # */5 0 * * * free >> /tmp/free.log
2017-09-20 00:10:00 +0900 JST # 10 0 * * * df -h >> /tmp/df.log
2017-10-01 10:00:00 +0900 JST # 0 10 1 * * date >> /tmp/date.log

License

MIT

Author

ariarijp

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址