Albert Albert - 1 month ago 8
Python Question

run a code every 5 minutes when django server is running

I have a django project and inside I have an app. Inside this app I created a management folder, inside this one I create a commands folder, and inside the last one I put my script with the init.py file too. My question is: how can I do to autorun that code every X minutes once the server is running to don't worry about execute the script myself.

Answer

You can refer, django-chronograph is a simple application that allows you to control the frequency at which a Django management command gets run.

chronograph

Hope this is helps you.