Schedule table updates in Django
<p>How do you schedule updating the contents of a database table in Django based on time of day. For example every 5 minutes Django will call a REST api to update contents of a table.</p>

<p>Based upon your question, I am not 100% clear what you are looking for. But, assuming you are looking to run some sort of a task every 5 minutes (that will make calls to the DB), then I <strong>highly</strong> suggest you look at <a href="http://www.celeryproject.org/" rel="nofollow">Celery</a>. </p>

<p>It is a robust task schedules, with <a href="http://docs.celeryproject.org/en/latest/django/first-steps-with-django.html" rel="nofollow">specific Django integration</a>. Once you get thru the <a href="http://docs.celeryproject.org/en/latest/getting-started/introduction.html" rel="nofollow">getting started</a> documentation, what you want to look at in particular is called <a href="http://docs.celeryproject.org/en/latest/userguide/periodic-tasks.html" rel="nofollow">CELERYBEAT_SCHEDULE</a>. This allows you to sort of setup cron like calls.</p>

<p>This has a lot of <a href="http://stackoverflow.com/a/16234656/1036843">benefits over cron</a>, and for most use cases I find it to be a better alternative. Scalability is a huge feature for me.</p>

<p>Good luck!</p>

python django django-models