How to make a code that alters database in background Django
If your scenario is just to update the database based on the number of votes, you can straight away go for cron.
Write a script that checks for the votes and changes the status of the user in the database. Schedule it in cron to run it once at the end of the day / poll.
Place the script in a directory that is not reachable by outsiders.
cron entry for a script to run once a day at 23:30 hrs:
30 23 * * * python /root/scripts/status_change_script.py
I'm making an elimination style voting website. People log in, vote for their least favorite participant, and at the end of the day the person with the most votes goes inactive. Almost everything works: The log in, the voting, etc. But I have no idea how to make a program that checks for the most votes and alters the database to change the status of a participant at a particular time without needing a user to enter the website. 
I don't even know where to put the code. And how would I make sure it's constantly running? The way I see it, views.py only works when a user goes to the URL, so if no one visited the website at the time of vote recopilation it wouldn't work, so that's a no no. I could make a script outside of the Django project that does this, and then run it with nohup &, but then I'd lose on the model notation and would have to make manual queries, plus I'm sure there's a better, more Django way to do this.
Any solutions to this problem? Or maybe some direction you can point me in?