Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django Crontab on docker-image not reading env-variable from K8S deployment config #127

Open
vinoalterra opened this issue Dec 3, 2021 · 1 comment

Comments

@vinoalterra
Copy link

Environment & Versions

  • Operating system: Debian 5.10.46-4~bpo10+1 (2021-08-07) x86_64 GNU/Linux
  • Python: 3.8.6
  • Django: 3.1.13
  • django-crontab: 0.7.1

Settings

  • My django-crontab settings:
CRONJOBS = [
    ('* * * * *', 'transaction.cron.transactionjob'),
]

Details

  • Output of crontab -l after running python manage.py crontab add.
* * * * * /usr/local/bin/python /app/rad/manage.py crontab run 68088a22e67d51156d821934dfc83deb # django-cronjobs for rad
  • If this output contained a crontab run command and I copy this command to my terminal the job works: yes

The Problem

  • If i run task manual via python manage.py crontab run 68088a22e67d51156d821934dfc83deb => env-variables can be read correctly
  • But if crontab task executed by cron service (inside k8s container/pod) => env-variable can't be read

Any suggestion?

@GorlikItsMe
Copy link

Check this: #130 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants