Skip to content

ryangardner/chronos

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chronos

cron-like jobs for back-end systems

UI

Features of chronos

  • job history tracking
  • job versions
  • automatic rerun with configurable max attempts
  • email notifications (reports, failures, etc)
  • REST api
  • 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

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.

About

cron-like jobs for back-end systems

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 53.8%
  • JavaScript 27.0%
  • CSS 18.8%
  • Other 0.4%