We've released django-rq-cron, a cleverly-titled cron module sitting on top of RQ and Django RQ.
We use this to process all of our scheduled and periodic events: sending daily emails, running our checker system, and more. We're releasing it in hopes that other folks with the same set of concerns and characteristics might find it useful.
We're marking this initial release as 0.2.0 (a nice middle ground between "stable" and "totally experimental, do not touch") not because we don't think it's technically production-ready — it is. We have been using this in production for almost a year. But because I suspect the API in some of the interfaces that work for our idiosyncratic needs might not be broadly applicable.
The question when releasing one of these packages is, why build out a cron package in the first place?
The existing package we were using, django-cron, had some issues for us and rather than try to paper over the issues that were fairly systemic it made sense to spike out building our own system. That spike ended up turning out pretty well and over time we fleshed out something that felt fairly mature and robust and now here we are.
The specific issues we ran into were threefold:
django-rq-cron
started as an experiment for a few particularly sensitive crons, and it ended up working so well that we quickly migrated all of our crons to it. And here we are, releasing it to the world!
Even if you feel like your cron needs are completely solved, hopefully you find some of this interesting. The codebase itself is fairly compact and uncomplicated. We've got a set of models for governing the cron state machine, a registrar pattern for allowing you to register a cron in much the same way you might register a Django model admin, and a runner to actually invoke the crons and enqueue them as RQ jobs.
Please take a look at the codebase and let me know if you have any questions or hot takes or violent criticisms.
Justin Duke is a software engineer, lover of words, and the creator of Buttondown.