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
    5 Ways that CSS and JavaScript Interact That You May Not Know About

    CSS and JavaScript:  the lines seemingly get blurred by each browser release.  They have always done a very different job but in the end they are both front-end technologies so they need do need to work closely.  We have our .js files and our .css, but...

  • By
    9 Mind-Blowing Canvas Demos

    The <canvas> element has been a revelation for the visual experts among our ranks.  Canvas provides the means for incredible and efficient animations with the added bonus of no Flash; these developers can flash their awesome JavaScript skills instead.  Here are nine unbelievable canvas demos that...

Incredible Demos

  • By
    Creating Spacers with Flexbox

    I was one of the biggest fans of flexbox before it hit but, due to being shuffled around at Mozilla, I never had the chance to use it in any practice project; thus, flexbox still seems like a bit of a mystery to me.  This greatly...

  • By
    Table Cell and Position Absolute

    If you follow me on Twitter, you saw me rage about trying to make position: absolute work within a TD element or display: table-cell element.  Chrome?  Check.  Internet Explorer?  Check.  Firefox?  Ugh, FML.  I tinkered in the console...and cussed.  I did some researched...and I...

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!