I have a tasks.py file that's located in project/app/tasks.py that uses the standard logger:
import logging
logger = logging.getLogger(__name__)
The logging file is configured with loggers for all of the following:
django, app, django_crontab, django_crontab.crontab, crontab, and ''
When is open the shell and run the function, the logging appears:
python manage.py shell
import django
django.setup()
from app.tasks import my_scheduled_task()
my_scheduled_task()
Yet, when I add the cron job using python manage.py crontab add everything works (I can see the end result appear), yet nothing gets logged. Any reason why logging should work using the shell, but not as a cron?
I have a tasks.py file that's located in project/app/tasks.py that uses the standard logger:
The logging file is configured with loggers for all of the following:
django,app,django_crontab,django_crontab.crontab,crontab, and''When is open the shell and run the function, the logging appears:
Yet, when I add the cron job using
python manage.py crontab addeverything works (I can see the end result appear), yet nothing gets logged. Any reason why logging should work using the shell, but not as a cron?