Hi,
Writing this for anyone else that runs in this problem as I couldn't find anything in these forums.
I'm using django-mailer to queue and send mails using my database using python manage.py runmailer_pg
. This was working fine when run from a console, however it did not work when run as either a Scheduled or Always-On task.
My task command was
/home/username/.virtualenvs/venv/bin/python /home/username/app/manage.py runmailer_pg
The fix was to run the command from the application directory. So doing:
cd /home/username/app/ && /home/username/.virtualenvs/venv/bin/python /home/username/app/manage.py runmailer_pg
I did not notice at the time but the logs were indicating there was a problem with the lock file. I figured it out by noticing that the command was not working when run from the root in Console.