Search code examples
pythondjangoserverauto-update

Django - Auto run scripts at certain time on Live Server


Newbie here. I have a lot of different functions in a Python program that downloads a bunch of data from the internet, manipulates it, and displays it to the public. I have bunch of links to different tables of data, and I figure it would be very inconvenient for people to have to wait for the data to download when they clicked the link on my website. How can I configure Django to run the scripts that download the data at say, like 6am? And save some type of cached template of the data so people could quickly view that data for the entire day, and then refresh and update the data for the next day. Your insight and guidance would be very appreciated! Thank you! and Happy holidays!


Solution

  • I'd suggest celery for any recurring tasks in Django. Their docs are great and already have a use with Django tutorial right in them.