I used Elastic Beanstalk to run the Django app on AWS. I want to run cronjob to update some of my models. I made a special management command ( https://docs.djangoproject.com/en/1.6/howto/custom-management-commands/ ) and can run it locally, but if I ssh into my instance and run crontab, I get the error:
There is no module named django.core.management
What is the best way to run cronjobs for a Django project on AWS?
For this to work (this is undocumented, so it can be changed at any time)
*/10 * * * * source /opt/python/current/env && django-admin.py do_your_thang
/opt/python/current/env , " ", , ..
/opt/python/current/env
EB + cron + django EB.
Django 1.10.6 + AWS ElasticBeanstalk + Cronjob
* * * * * source /opt/python/run/venv/bin/activate && cd /opt/python/current/app/ && python manage.py do_your_thing > $HOME/cron-sqs.log 2>&1
do_your_thing
Source: https://habr.com/ru/post/1528005/More articles:Change selected map marker or map marker color? [Ios] - iosusing nonfree (SIFT, SURF) in android with java - javaПочему AutoFixture.AutoMoq делает рекурсивные mocks по умолчанию? - c#Pocketsphinx Android Multiple Keyword Spotting - androidCollecting blocks of text in a largely free form using FParsec - f #Losing alpha channel information opening BMP file - c #Is it possible to run part of the task on the master, and the other part on the slave? - continuous-integrationDuplicating a string in emacs with Ace-Jump - emacsEdit comment Font in knitr - rIP switches to a shared hosting account - hostingAll Articles