Tivix/django-cron

Cron tasks not being spawned

Lynaj opened this issue · 1 comments

Lynaj commented

I have django combined with Docker. django-cron is installed & configured, but the process of invoking it is pretty much random.
Whenever I do stop the docker image, and after making the necessary changes turn it on, django-cron is not being launched, even tho I do have following line in my Docker's entrypoint script:

python manage.py runcrons --force
crontab cron_jobs

cron_jobs:

*/5 * * * * cd /usr/src/ && python /usr/src/manage.py runcrons > /var/log/cron

Hi @Lynaj. This is more a cron/docker configuration issue, and not specific to django-cron.

That said, I'm not a docker expert and the way I've worked around it is to add cron to the CMD.