Skip to content

yieldbot/chronos-shuttle

Repository files navigation

chronos-shuttle

Build Status GoDoc Release

An opinionated CLI for Chronos

Installation

Binary releases

Linux OSX
64bit 64bit

See all releases

Building from source

go get github.com/yieldbot/chronos-shuttle
cd $GOPATH/src/github.com/yieldbot/chronos-shuttle
go build

Usage

Help

./chronos-shuttle -h
Usage: chronos-shuttle [OPTIONS] COMMAND [arg...]

An opinionated CLI for Chronos

Options:
  --chronos     : Chronos url (default "http://localhost:8080")
  --proxy       : Proxy url
  -h, --help    : Display usage
  -pp           : Pretty print for JSON output
  -v, --version : Display version information
  -vv           : Display extended version information

Commands:
  add           : Add a job
  del           : Delete a job
  graph         : Retrieve the dependency graph
  jobs          : Retrieve jobs
  kill          : Kill tasks of the job
  run           : Run a job
  sync          : Sync jobs via a file or directory

Setting Chronos Url

Default Chronos url is http://localhost:8080. But also you can use --chronos argument on each command or set ENV variable with following command

export CHRONOS_URL=http://localhost

Setting Proxy Url

You can use --proxy argument on each command or set ENV variable with following command

export SHUTTLE_PROXY_URL=http://localhost:8892

Getting jobs

./chronos-shuttle jobs

Syncing jobs

Syncing a file

./chronos-shuttle sync examples/jobs/job-1.json

Syncing a directory

./chronos-shuttle sync examples/jobs/

Adding a job

./chronos-shuttle add '{"schedule": "R/2015-11-09T00:00:00Z/PT24H", "name": "test-1", "epsilon": "PT30M", "command": "echo test-1 && sleep 60", "owner": "localhost@localhsot", "async": false}'

Running a job

./chronos-shuttle run test-1

Killing job tasks

./chronos-shuttle kill test-1

Retrieving the dependency graph

./chronos-shuttle graph test-1

Deleting a job

./chronos-shuttle del test-1

TODO

  • Auto binary release
  • Add tests

License

Licensed under The MIT License (MIT)
For the full copyright and license information, please view the LICENSE.txt file.

[coverage-image]: https://coveralls.io/repos/yieldbot/chronos-shuttle/badge.svg?branch=master&service=github)