According to this document https://pypi.org/project/django-crontab/
If I want to set a variable environment in crontab, I should do this
CRONTAB_COMMAND_PREFIX="STAGE=production"
provided I want to set multiple variables, what should I do ?
I tried
CRONTAB_COMMAND_PREFIX="STAGE=production,TOKEN=ABC"
but seems to be not working
CodePudding user response:
ENV
s should be separated by space.
So correct usage will be CRONTAB_COMMAND_PREFIX="STAGE=production TOKEN=ABC"
After that django-crontab
will join prefix with command line and it will be looks like
STAGE=production TOKEN=ABC command