It means you can make your application do something in the future: send an HTTP request every morning at dawn, email your users on their birthday, call yourself in 15 minutes… all that and more in just 2 lines of code.
import crono
crono.call('+1 (555) 555-5555').after(minutes=15)
Some more examples:
crono.log('DEBUG', 'foo').after(seconds=42)
crono.request('GET', 'https://url.com/').on(tomorrow_datetime)
crono.message('+1 (555) 555-5555', 'foo').every(minutes=42)
crono.call('+1 (555) 555-5555', 'bar').at('1145 jan 31')
crono.email('foo@bar.com', 'foo').cron('0 6 * * 2')
How does it work?
Crono is built on top of Celery, an open-source distributed task queue trusted by companies to process millions of tasks a day. Crono also uses RedBeat to store the schedule in Redis rather than within the process space of the Celery Beat daemon.
The main benefit of Crono is the super easy-to-use API it offers to developers.
Triggers define when a job will be executed.
after
specifies a countdown until the execution of a taskon
specifies the execution of a task at a specific date and timeat
implements the command at in Unix-like operating systemsevery
specifies a frequency at which to execute a taskcron
uses an expression to specify the execution timeTasks define what a job will do.
log
uses the logging Python Standard Libraryrequest
sends an HTTP request (powered by Requests)message
sends an SMS (powered by Twilio)call
initiates a phone call (powered by Twilio)email
sends an email (powered by Postmark)Tasks and triggers are commutative, meaning changing their order does not change the result.
crono.call('+1 (555) 555-5555', 'hello').after(minutes=15)
# is the same as
crono.after(minutes=15).call('+1 (555) 555-5555', 'hello')
Want to read more technical documentation? README.md
How much does it cost?
The Crono codebase is free and open-source on GitHub. You can get it now, deploy it, and run it on your own servers. Or, you can use the hosted version. It's not free but you don't have to worry about anything and you can get started in just a few minutes.
OSS | Hobbyist | Startup | |
Executions | unlimited | 1,000/month | 10,000/month |
Support | GitHub issues | emails | priority emails (< 24hr) |
Price | free to use | $14/month $0.014/execution |
$34/month $0.0034/execution |
GitHub repo | Get started | Get started |
If you need more than 10,000 executions per month, let's chat: georges.duverger@gmail.com
What are the alternatives?
You've probably heard of cron
, the Unix utility to schedule jobs to run periodically at fixed times, dates, or intervals. A lot of companies still rely on it. cron
is simple to set up but it runs on a single machine, it does not scale, it's error-prone, and it's hard to debug.
For all those reasons, more sophisticated tech companies have replaced cron
with their own solutions: Airbnb’s Chronos, Yelp’s Tron, NextDoor’s NDScheduler… Those solutions are distributed and more reliable but hard to deploy and maintain.
Crono is the best of both worlds, simple and reliable. It is aimed toward product engineers who want to get something up and running as efficiently as possible.
Who makes it?
I am Georges Duverger. I worked as a software engineer for 10 years before transitioning to product management in 2015. I worked at 4 technology startups (Akoha, Hunch, Phosphorus, and Nautilus Labs) and 1 multinational corporation (eBay). Along the way, I launched my own products (Fitmeal, Crono, CTRL+F) and open-source projects (Screen, PlainChart, Print).
Made in Cambridge, MA ☘️