Code Monkey home page Code Monkey logo

chronos's Introduction

chronos

cron-like jobs for back-end systems

UI

Features of chronos

  • dependent jobs
  • job history tracking
  • job versions
  • automatic rerun with configurable max attempts
  • email notifications (reports, failures, etc)
  • REST api
  • swagger docs
  • multiple datasource support
  • BSD license

What is chronos?

chronos is for running jobs that would normally be put into a crontab but would be easier to manage and track through a simple ui and some retry and emailing mechanisms.

Example use-cases

A chronos job could be a Hive Query that needs to run every hour to populate a table that your api queries for an internal app, or just a periodic query that transforms some data for another back-end process. Another example might be a recurring report that needs to be sent to business leads every week, that queries a MySql database and sends the top 100 results. chronos makes these tasks simple to create, update, track, and rerun.

Why chronos?

You're probably tired of ssh-ing to machines and rerunning jobs manually after hearing that they failed from someone that's not even on your tech team. So we've built a system that takes care of that and let's you rest easy on the weekend and hopefully spend more time coding during work hours.

chronos has been implemented in a way that lets you add a new back-end for storing jobs and history if needed. Currently we have a MySql implementation of the WithBackend interface. It would be trivial to add more to suit your needs. JDBC connections are currently used for jobs.

Configuration and Prerequisites

chronos uses a Java-based spring config.

  • java 7 for backend
  • node >= 4 and npm >= 3 for ui

Test

Build Status Coverage Status

mvn clean test

Run locally

./build_site.sh
mvn clean package install
cd chronos-web/
mvn tomcat7:run

Note: This creates a small test table in H2 for running jobs against. Details of the table can be found here.

Run a job with the ui

  1. Navigate to http://localhost:8080
  2. Click New Job
  3. Fill out the form. A query similar to CREATE TABLE my_table_name AS SELECT * FROM testchronos; will work.
  4. View log output of mvn tomcat7:run to see that job has completed.

Future development

Pull-requests are welcome! Feel free to contact us with Github Issues.

Further Reading

Reliable Cron Across the Planet

Chronos: A Replacement for Cron

Quora's Distributed Cron Architecture

Distributed Job Scheduling for AWS

Luigi

Authors

chronos was built at The Huffington Post, mainly by @sinemetu1, @mikestopcontinues, @edwardcapriolo, @ellnuh, and @dmitry-s.

chronos's People

Contributors

mikestopcontinues avatar sinemetu1 avatar vincentwenathuff 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.