z3c.recipe.usercrontab ported to python 3

Tags: python, buildout, django

z3c.recipe.usercrontab is a simple buildout recipe to add content to your buildout user’s crontab.

Our django sites often have something like this in our buildout configs, just to give you an idea of what you can do with it:

# Start supervisor (which in turn starts django and celery)
# when the server starts.
recipe = z3c.recipe.usercrontab
times = @reboot
command = ${buildout:bin-directory}/supervisord

recipe = z3c.recipe.usercrontab
times = 14 3 * * *
command = ${buildout:bin-directory}/django clearsessions

Easy peasy. Especially starting the site @reboot is handy. You could also add an entry in /etc/init.d/your_site, but this way most of the setup of the site is handled for you by a single bin/buildout call.

The previous release was in 2010: it simply didn’t need any changes, it just performed the job it did and did it well :-) Now I’ve made a few small changes, mostly in the test code. Another package ported to python 3!

vanrees.org logo

About me

My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.

Weblog feeds

Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):