django-cronjobs | A simple cron-running management command for Django | Cron Utils library
kandi X-RAY | django-cronjobs Summary
kandi X-RAY | django-cronjobs Summary
A simple cron-running management command for Django
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Handle cron jobs .
- Decorator to register a function .
django-cronjobs Key Features
django-cronjobs Examples and Code Snippets
Community Discussions
Trending Discussions on django-cronjobs
QUESTION
In order to periodically execute tasks in my Django app I have installed django_crontab
extension. My app consists of both dockerized database and Django app.
https://pypi.org/project/django-crontab/
I have done every step as it is described in setup paragraph.
settings.py
ANSWER
Answered 2021-Nov-01 at 23:54A Docker container only runs one process. You need to run two separate things: the main application server, and (after some initial setup) the cron daemon. You can straightforwardly run two separate containers running two separate commands from the same image, with the correct setup.
The first change I would make here is to combine what you currently have as a split ENTRYPOINT
and CMD
into a single CMD
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install django-cronjobs
You can use django-cronjobs like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page