Skip to content
generate crontab document tool
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
CHANGELOG.md
LICENSE
README.md
cli.go
cli_test.go
main.go
version.go

README.md

crondoc

generate crontab document tool

Description

  • crondoc is tool what generate crontab document from crontab or stdin
  • Grouping up to line break

Usage

$ crondoc /etc/crontab
$ crontab -l | crondoc -s
usage: crondoc [OPTIONS] <args> crontab_path

argument
	[crontab_path] generate crontab document

Available options are:
	-v --version	print versions
	-h --help		print help
	-s --stdin		generate crontab document from stdin
	-n				except output comment out line

document example

it will be such an output ....

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# @title monday.sh
# @author hoge
# @param env[dev|stg|prod]
# start every monday
0 10 * * 1 sh /home/hoge/happy_monday.sh prod

↓↓↓

Environment variable

  • SHELL=/bin/bash
  • PATH=/sbin:/bin:/usr/sbin:/usr/bin
  • MAILTO=root,hoge@mail.co.jp
  • HOME=/

monday.sh

  • Author : hoge
  • param : env[dev|stg|prod]
  • start every monday
min hour day month day week command
0 10 * * Mon sh /home/hoge/happy_monday.sh prod

document format

only markdown now ....

document tags

  • @title
  • @author
  • @param

Install

Just want the binary?

Go to the releases page

To install, use go get:

$ go get -u github.com/ogataka50/crondoc

Contribution

  1. Fork (https://github.com/ogataka50/crondoc/fork)
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the master branch
  5. Run test suite with the go test ./... command and confirm that it passes
  6. Run gofmt -s
  7. Create a new Pull Request

TODO

  • Selectable output format
  • Add many types of tags

License

MIT

Author

ogataka50

You can’t perform that action at this time.