Doing python manage.py crontab show gives active jobs 4352ef0f6fe98d93b9d2faed8b627705 -> ('*/1 * * * *', 'freego.cron.updatedb', '>> cronjobs.log')
But running cronjobs with python manage.py crontab run 4352ef0f6fe98d93b9d2faed8b627705 gives an error ModuleNotFoundError: No module named 'freego.cron'
I tried different module names. Knowing that my custom command updatedb is at /backend/management/command/updatedb.py, I tried backend.management.command.updatedb, sliding in a .cron. Also tried django.core.management.updatedb etc, but nothing seems to work
However, running python manage.py updatedb works so we can still update the db manually through ssh
I think the problem comes from settings.py
Doing
python manage.py crontab show
gives active jobs4352ef0f6fe98d93b9d2faed8b627705 -> ('*/1 * * * *', 'freego.cron.updatedb', '>> cronjobs.log')
But running cronjobs with
python manage.py crontab run 4352ef0f6fe98d93b9d2faed8b627705
gives an errorModuleNotFoundError: No module named 'freego.cron'
I tried different module names. Knowing that my custom command
updatedb
is at/backend/management/command/updatedb.py
, I triedbackend.management.command.updatedb
, sliding in a.cron
. Also trieddjango.core.management.updatedb
etc, but nothing seems to workHowever, running
python manage.py updatedb
works so we can still update the db manually through ssh