Questions tagged [django-cron]

Django-cron lets you run Django/Python code on a recurring basis proving basic plumbing to track and execute tasks.

Django-cron lets you run Django/Python code on a recurring basis proving basic plumbing to track and execute tasks.

The 2 most common ways in which most people go about this is either writing custom python scripts or a management command per cron (leads to too many management commands!).

Along with that some mechanism to track success, failure etc. is also usually necessary.

GitHub repo: https://github.com/Tivix/django-cron

Documentation: https://django-cron.readthedocs.io/en/latest/

65 questions
0
votes
0 answers

In django, use django-dbbackup and django-crontab to backup automatically

I'm use django-bdbackup and django-storage backup my db into aws s3, fortunately it work. In the next step, I want to it backup automatically, but it's not lucky this time. I add two things in SETTINGS: INSTALLED_APPS =…
madarame
  • 23
  • 2
0
votes
1 answer

`django-cron==0.5.0` is not able to run scheduled cron jobs in `python:2.7` and `python:2.7-slim-buster` docker image

I'm sharing my GitHub repository link for your reference. https://github.com/deepenpatel19/test_django_cron Here, I have set up one project to test cron scheduler in Docker. but, the scheduler is not being run on time. I have to run manually. Django…
Deepen Patel
  • 162
  • 3
  • 10
0
votes
0 answers

Cron job with django application

I would like to use a cron task in order to delete media files if the condition is True. Users generate export files stored in the Media folder. In order to clean export files in the background, I have a Cron task which loops over each file and…
Essex
  • 6,042
  • 11
  • 67
  • 139
0
votes
0 answers

Django crontab logs :ModuleNotFoundError: No module named 'sslserver'

I have a django crontab running at the server, if I see it's log it gives me the following error. File "/usr/local/lib/python3.6/dist-packages/django/apps/registry.py", line 85, in populate app_config = AppConfig.create(entry) File…
Paras
  • 3,191
  • 6
  • 41
  • 77
0
votes
1 answer

Running specific views.py method on django_cron

I have this method on my views.py file: def getHistoricRates(): """ Here we have the function that will retrieve the historical rates from fixer.io, since last month """ rates = {} response =…
NeoVe
  • 3,857
  • 8
  • 54
  • 134
0
votes
1 answer

Cron not doing my task without the command python manage.py runcrons

I managed to make a function that sends lots of emails to every user in my Django application, for that I used the django-cron package. I need to send the emails in a particular hour of the day, so I added in my function the following: RUN_AT_TIMES…
Matheus Sant'ana
  • 563
  • 2
  • 6
  • 23
0
votes
3 answers

django-crontab missing hash after a day

I'm using django-crontabto run a function every day in my server. When I add the cron with python manage.py crontab add everything is ok, I can see the crons and they execute normally (I've tested them running every minute and they do what I want).…
Alberto
  • 1,348
  • 2
  • 14
  • 28
0
votes
3 answers

Issue setting up django-crontab

I am having some issues setting up django-crontab in my django project. I have followed the instructions given on the official documentation :- https://pypi.python.org/pypi/django-crontab I have defined my cron.py under an app named ciscoaci. So…
Sindhujit
  • 51
  • 9
0
votes
2 answers

django_cron config when .ebextensions is not in root directory

There are a few solutions to configuring .ebextension container commands for cronjobs but none of them are working for me. I am concerned that the reason they aren't working is because .ebextensions is not in the root directory. This messy code was…
0
votes
2 answers

django-cron task not executing automatically

When I run python manage.py runcrons, the cron job successfully executes (prints 'Executed'). But it doesn't do it automatically. It's supposed to execute every minute as I've stated in the Class. Here's the code: settings.py CRON_CLASSES = [ …
Zorgan
  • 8,227
  • 23
  • 106
  • 207
0
votes
1 answer

python function when added to cron using django-crontab gives "No JSON object could be decoded" ERROR

When i execute my python function on django shell it executes fine. But when the function is executed via crontab it gives "No JSON object could be decoded" Error. successfully made the api call. response status is 200 Exception occured : No JSON…
Shruti Agarwal
  • 887
  • 2
  • 14
  • 29
0
votes
1 answer

Django-Crontab with deployment environment

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…
LKM
  • 2,410
  • 9
  • 28
  • 53
0
votes
4 answers

how to start Crontab in Django Project locally?

I still pretty new to the use of crontab in Django. I have followed the instruction in this link https://hprog99.wordpress.com/2014/08/14/how-to-setup-django-cron-jobs/ to help me set up my method, my_scheduled_job() in cron.py file, which I want to…
curiousDog
  • 83
  • 1
  • 8
0
votes
0 answers

warning in django_cron (Django management > commands is deprecated)

I have this warning, when do runcrones with manage.py. Where am I doing wrong? site-packages/django/core/management/init.py:345: RemovedInDjango110Warning: OptionParser usage for Django management commands is deprecated, use ArgumentParser…
umaru
  • 178
  • 11
0
votes
1 answer

what is the directory .virtualenvs? (was: ImportError: No module named django_cron, is my virtual environment set correct?)

I am trying to modify my virtual environment to add a new library (django-cron). When I execute a pip list (env_dili_py27)[todd@somewhere site-packages]$ pip list Django (1.5.4) django-common-helpers (0.6.0) django-cron (0.3.3) django-filter…
akaphenom
  • 6,728
  • 10
  • 59
  • 109