Run Individual Cron Routines within Django

Written by David Walsh on February 16, 2013 · 1 Comment

When you're looking to run a single cron routine within Django, hit the terminal and run this:

# Running the "build_sitemaps" routine
./manage.py cron build_sitemaps

To see a list of available cron routines, run:

./manage.py cron

Running individual cron routines is probably an obvious flow for Django experts but hopefully this is easier to find than searching through loads of documentation!

Comments

  1. Hmmm, I’m fairly new to Django but I don’t see any management commands related to cron in Django 1.4 that I’m using.

    Were you maybe using some Django app such as Django Cronjobs (https://github.com/jsocol/django-cronjobs), for example, to get that management command?

    Keep up the good work with the posts!

Be Heard

Tip: Wrap your code in <pre> tags or link to a GitHub Gist!

Use Code Editor
Older
Build a Street Fighter Demo with CSS Animations and JavaScript
Newer
Install Chrome Store Web Apps with JavaScript