Skip to main content

Simple, generic cron-like job runner service for Django

Project description

A beat server for Django, with cron-like syntax

Bronski allows you to configure periodic function calls using a Django model.

It is ideally suited to being a task “beat” sever, akin to celery-beat.


$ pip install bronski


  1. Add ‘bronski’ to your INSTALLED_APPS

    This is only needed to enable the management command.

  2. Create a model in your own app that inherits from bronski.models.CrontabBase

  3. Create and apply migrations:

    $ makemigrations
    $ migrate
  4. Specify your model in settings

    CRONTAB_MODEL = "myapp.MyCronModel"
  5. Launch your beat server:

    $ ./ bronski

Each minute the bronski service will scan the model for enabled jobs that haven’t been run in the past 59 seconds. It will then check each to see if its crontab definition matches the next minute.

For job records that match, their run method will be called. The default run method will:

  • get the specified function by calling self.get_function()

  • resolve the kwargs to use by calling self.get_kwargs()

  • invoke the function with the kwargs.

You can override run in your custom model to, for instance, enqueue jobs:

class Jobs(CrontabBase):

    def run(self):
        func = self.get_function()
        kwargs = self.get_kwargs()

        # Celery task API:
        # Dramatiq actor API:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bronski-0.4.0.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distribution

bronski-0.4.0-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page