I'd like to ask you all to help me to understand the concept of what should be inside executable file to run periodic tasks. Say I got django project with tasks app inside among others apps. There is a tasks.py file inside the tasks app. Tasks.py file should check all main project's users registered and send email to them once a week. I hope that tasks.py should query all users just like doing it normally in models.py but I suppose that I should bind somehow tasks.py file with hole project to access project's data and functionalities because tasks.py file is running in some separation as lonely file. Correct me please if the concept is different. But if it looks like this more or less how should I set settings correctly. I saw that I should use settings.configure() or DJANGO_SETTINGS_MODULE. The second option should be made in $VIRTUALENV/bin as I suppose. If so, the tasks.py file should be run inside virtualenv? I don't think so. Could any good soul help me with that mess in my head, please?