0

I'm developing a module with the crontab.

Actually, the framework I'm using is django so I did install 'django-crontab'

I did test as the instruction did and make it with localhost environment.

When I deployed("sudo service apache2 restart") it on AWS after doing a command 'python manage.py crontab add', it didn't work.

I thiknk it's working on only localhost environment, isn't it?

How can I solve this problem?

LKM
  • 2,410
  • 9
  • 28
  • 53

1 Answers1

0

If you have more than one profile in your django settings, you shuold specify one before add crontab. if not specified, django crontab run as default environment, which is develop mostly. To run it on product environment , you should do these:

  1. specify crontab enviromen in settings.product.py, something like

    CRONTAB_DJANGO_SETTINGS_MODULE = 'gold.settings.product'

  2. specify settings profile and add crontab

    export MYPROJECT_PROFILE = product python manage.py crontab add

李东勇
  • 190
  • 1
  • 10