Handy crontab buildout recipeΒΆ

Tags: grok, plone, thehealthagency, buildout

I've recently discovered a handy buildout recipe for maintaining your user's crontab: z3c.recipe.usercrontab (made by two of my colleagues). It is intended to add/remove entries to your user's crontab, not to maintain the system-wide /etc/crontab.d/*.

So for the obvious `@reboot` entry you'd add something like the following to your buildout:

  [buildout]
  ...
  parts = ... crontab

  [crontab]
  recipe = z3c.recipe.usercrontab
  times = @reboot
  command = ${buildout:directory}/bin/instance start

You can have multiple crontab parts in one buildout and you can have multiple buildouts writing to the same crontab. No problem at all. Existing entries are also preserved. Works like a charm.

 
vanrees.org logo

Reinout van Rees

My name is Reinout van Rees and I program in Python, I live in the Netherlands, I cycle recumbent bikes and I have a model railway.

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):