Run Individual Cron Routines within Django

By  on  

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!

Recent Features

  • By
    Being a Dev Dad

    I get asked loads of questions every day but I'm always surprised that they're rarely questions about code or even tech -- many of the questions I get are more about non-dev stuff like what my office is like, what software I use, and oftentimes...

  • By
    CSS @supports

    Feature detection via JavaScript is a client side best practice and for all the right reasons, but unfortunately that same functionality hasn't been available within CSS.  What we end up doing is repeating the same properties multiple times with each browser prefix.  Yuck.  Another thing we...

Incredible Demos

  • By
    :valid, :invalid, and :required CSS Pseudo Classes

    Let's be honest, form validation with JavaScript can be a real bitch.  On a real basic level, however, it's not that bad.  HTML5 has jumped in to some extent, providing a few attributes to allow us to mark fields as required or only valid if matching...

  • By
    MooTools Window Object Dumping

    Ever want to see all of the information stored within the window property of your browser? Here's your chance. The XHTML We need a wrapper DIV that we'll consider a console. The CSS I like making this look like a command-line console. The MooTools JavaScript Depending on what you have loaded...

Discussion

  1. Jarno

    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!

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!