Questions tagged [django-crontab]
22 questions
3
votes
1 answer
Django Crontab Job Not Executing Within Docker Container
I am facing an issue with running Django crontab jobs within a Docker container. The crontab jobs work perfectly in my local development environment, but when I dockerize my Django app and attempt to run it within a container, the crontab jobs do…

Zaman Kazimov
- 31
- 3
3
votes
0 answers
Why is my django-crontab cronjob not working?
I have a django-project with an app called app that has a file called cron.py with a function called my_job().
I want the my_job() function to be called every minute.
In my django-project/django-project/settings.py I have this:
INSTALLED_APPS = [
…

Anik Saha
- 97
- 6
2
votes
0 answers
Django-crontab doesn't execute tasks on Docker container
I've been working on this all week, and I don't seem to understand what I'm missing. The problem is simple, I've a container running a platform on Django, and I need to create a Cronjob for an smaller task, I created a test ask that executes every…

Efraín
- 453
- 1
- 7
- 13
2
votes
2 answers
Why is my django-crontab cronjob not executing?
I have a django-project with an app called app that has a file called cron.py with a function called main_routine().
I want the main_routine() function to be called every minute.
In my django-project/django-project/settings.py I have…

Merlin Duty
- 25
- 1
- 7
1
vote
1 answer
Set cronjobs to run everyday at 6am in django python
I am using Django-Crontabs to execute my function every day in the morning at 6 am. Here is my code for Django-Crontabs.
Firstly I install Django-Crontabs with this command. pip3 install Django-crontab
Settings.py
INSTALLED_APPS = [
…

HMS
- 97
- 8
1
vote
0 answers
Periodic tasks in Django are not called
I use django_crontab to periodically call my tasks. The problem is that periodic tasks are not called.
I created a test function that sends me a message and I can understand that the task is done:
def test_crj():
send_message("Test…

tetelevm
- 117
- 4
1
vote
0 answers
ModuleNotFoundError: No module named 'fcntl' on windows 11
I am using Django==4.1.1 and django-crontab==0.7.1
this error occurs when I use crontab on my project. How can I fix this error?

Partho Debnath
- 55
- 5
1
vote
2 answers
crontab django Erorr
I'm trying to start simple crontab-django job scheduled (os is Ubuntu 20.04):
this is the myapp/cron.py file as mentioned in the documentation
cron.py
from .models import Cats
def my_scheduled_job():
Cats.objects.create(text='Testt')
and…

Ahmad Hashim
- 13
- 4
1
vote
0 answers
Cronjob to run every n years and n weeks for django-celery-beat
I want to create a reminder very similar to google calendar custom reminder feature.
Where user can select number of days/weeks/months/years using djano-celery periodic task and crontab.
For eg I want a task to run on every 26th May in every 2 years…

Snehlata Giri
- 71
- 5
1
vote
1 answer
Django crontab automated setup issue in ubuntu development server
Am on a windows10 local development and has I can't use cron am testing in a development server.
my working basecommand
from api.models import EnrolmentUniquePattern
from django.core.management.base import BaseCommand
import datetime
from…

rmindzstar
- 338
- 2
- 11
0
votes
0 answers
Django Crontab keeps add "No module named 'django.utils.importlib'"
Every time I try to run python manage.py crontab add or run my testing script I get this:
python manage.py crontab add
Traceback (most recent call last):
File "manage.py", line 22, in
main()
File "manage.py", line 18, in main
…

Anik Saha
- 97
- 6
0
votes
0 answers
Cronjob with crontab fails to get access to my sqlite3 database in Django4
I want to use cronjobs to write data in my database. I use crontab do manage that.
I hav setup the setting.py file like this:
CRONJOBS = [ ('*/2 * * * *', 'someapp.cron.my_cron_test', ) ]
the actual cron.py is in the app folder and looks like…

Laurens Pohl
- 1
- 1
0
votes
0 answers
Cronjobs are not not created using django-crontab
I want to create cronjobs dynamically, not by manually writing them in the CRONJOBS variable in the config.settings.py module source code
Here is my code:
from django.conf import settings
from sender.auxfunc.create_cronjob import func
class…

Vsevolod
- 21
- 4
0
votes
0 answers
How to configure docker with django_crontab
Hi I'm trying to add a service to my docker https://pypi.org/project/django-crontab/ unfortunately despite reading a bunch of threads on the forum I still can't manage to configure the Dockerfile and docker-compose.yaml correctly. I would like to…

Memo
- 1
0
votes
0 answers
django-crontab job not running on developement server
I have the following task in cron.py.
from coreapp.models import Event, User
def update_survey_summary():
print("starting")
u = User.objects.get(email="admin@email.com")
e = Event(
creator=u,
title="Some event",
…

Samir Ahmane
- 830
- 7
- 22