Git Product home page Git Product logo

gronit's Introduction

Gronit

A Cron monitor written in Go.

Features:
  • Update and check job status remotely
  • View statistics of jobs
  • Bare bones alternative to services like Cronitor
Installing:
$ go get github.com/zricethezav/gronit
Usage:
$ ./gronit

This will start a server on default port 3231. Change the port with -p or --port option.

Generate a job tracker (with a gronit server running):

$ curl 127.0.0.1:3231/create
{"id":"f7a324"}

/create generates a job tracking token. Now we can wrap any command with gronit.

# sample crontab
*/2 * * * * curl -s 127.0.0.1:3231/run/f7a324 && sleep `echo $((1 + RANDOM \% 5))` && curl -s 127.0.0.1:3231/complete/f7a324

API

GET

  • /create generate new job id
  • /run/{id} update jobs's status to be 'running'
  • /complete/{id} update jobs's status to be 'complete'
  • /status/{id} status of job
    • sample response:{"status":"complete","time":"2018-01-10T13:36:05.197347-06:00"}
  • /summary/{id} job statistics for a job
    • sample response: {"status_count":24,"run_count":12,"completion_count":12,"average_time_to_completion":2200,"created_at":"2018-01-10T13:08:11.675697-06:00"}
  • /history/{id} full list of status updates for a job
    • sample response: [{"status":"running","time":"2018-01-10T13:10:00.281757-06:00"},{"status":"complete","time":"2018-01-10T13:10:01.408825-06:00"}]

gronit's People

Contributors

zricethezav avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.