I have wrote a python script which automatically uploads files from a given folder to a django modell. I want this script running while django server is running. My script runs perfectly when I run it in pycharm console.
I have tried a few command to achieve this:
python manage.py runserver & python manage.py shell < myscript.py
python manage.py runserver & python manage.py runscript -v3 myscript
In the first case nothing happens until I press ctrl+c, then it display errors "unexpected indent" for every single row of my code.
In the second case my script starts to run only when I press ctrl+c (so my django server is shut down and my script is executed).
I am using windows so celery is not a good alternative for me (and celery is overkill for such a simple task like that).