chronos

Please Note: This project has known security vulnerabilities. Use at your own risk!

cron-like jobs for back-end systems

UI

Features of chronos

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.

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.