Write cron business logic as a Python class and let this app do the rest! It enables Django projects to schedule cron tasks, tracks their success / failures, manages contention (via a cache) etc. Basically takes care of all the boring work for you :-)
I'm having trouble getting functions run through cron to log exceptions.
I know this module captures all exceptions, but I couldn't follow the part about logging to it's own error model.
Is there additional standard set-up required to log exceptions from django_cron that I'm missing?
Method used for running cron:
python manage.py runcrons "data_load_api.cron.RawDataLoading"
Server set-up:Django logging: Everything get's logged straight to console and therefore output through the gunicorn supervisor logs.
The logging set-up is fairly basic. There's a custom filter which prevents logging for unit tests.
I tried adding an additional handler specifically for django_cron, in case I needed to override but that didn't change anything.