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
14
votes
2 answers

Difference between usage of Django celery and Django cron-jobs?

I am sorry if its basics but I did not find any answers on the Internet comparing these two technologies. How should I decide when to use which as both can be used to schedule and process periodic tasks. This is what an article says: Django-celery…
user11004963
7
votes
3 answers

How to get django-cron to work automatically

I am trying to get django-cron working and its not. I followed the instruction here to set up my cron but the problem is that my job only runs when i type python manage.py runcrons on my command line and the job is not run every 5 minutes. I don't…
flexxxit
  • 2,440
  • 5
  • 42
  • 69
5
votes
2 answers

How does django-cron work?

A normal approach to cron jobs with a django site would be to use cron to run custom management commands periodically. But I found this http://code.google.com/p/django-cron/ How does it work, without needing cron? What invokes it to poll? If it just…
Eric
  • 1,093
  • 1
  • 9
  • 21
5
votes
1 answer

How to use Tivix django-cron app

I got exact same problem described in this post, but the answer doesn't help at all. In short, I am using Tivix django-cron, the cron job is not running at regular basis. To illustrate the problem, the following cron job class is intended to send…
Philip007
  • 3,190
  • 7
  • 46
  • 71
4
votes
1 answer

Gmail Schedule Send Email in Django

I want to mimic the functionality that Gmail has, where you can choose to send an email at a certain time (maybe 3:34 am tomorrow) in Django. I looked at something like django-crontab (https://pypi.org/project/django-crontab/). I came up with an…
user13486660
4
votes
3 answers

How to debud django crontab?

I have setup a cron job by using django crontab. As per defined in documentation I defined a test job in cron.py and defined it to run in 1 minute interval in settings.py. #cron.py def test_cron_run(): print("\n\nHello World....!!…
Paras
  • 3,191
  • 6
  • 41
  • 77
4
votes
2 answers

Getting error while running django_cron

When am trying to run the chron job in django using below command python manage.py runcrons its showing one error like below $ python manage.py runcrons No handlers could be found for logger "django_cron" Does any one have any idea about this…
Akshath Kumar
  • 489
  • 2
  • 6
  • 15
3
votes
1 answer

django cron job cannot get model query

I am using django-crontab and the following cron job is working well: the following cron job is added by python manage.py crontab add settings.py CRONTAB_COMMAND_SUFFIX = '2>&1' CRONJOBS = [ ('*/1 * * * *', 'my_app.cron.test','>>…
compmonks
  • 647
  • 10
  • 24
3
votes
0 answers

Could not import Django error after running manage.py runcrons in crontab (MacOs Sierra)

I'm using Django-Cron to schedule some database stuff. But after I edited my crontab like so: */1 * * * * /Users/apple/Documents/Django/pricecompare/manage.py runcrons >> /Users/apple/Documents/Django/pricecompare/app/log.txt" I'm getting this…
3
votes
1 answer

Django Cron ImportError: No module named cron

I'm trying to setup django-cron https://github.com/Tivix/django-cron I've finished migrating it but running python2.7 manage.py runcrons throws this error Make sure these are valid cron class names: ['rest.cron.MyCronJob'] Traceback (most recent…
Samuel Muiruri
  • 625
  • 1
  • 5
  • 13
2
votes
2 answers

How to schedule django crons?

I have a cron which I have written using django-cron: from django_cron import CronJobBase, Schedule class MyCronJob(CronJobBase): RUN_EVERY_MINS = 1 schedule = Schedule(run_every_mins=RUN_EVERY_MINS) code = 'statuscheck.my_cron_job' …
CodingDuck
  • 60
  • 2
  • 9
2
votes
2 answers

python manage.py crontab add, Unknow Command Error

I am trying to configure django-crontab by following this article, I have done all the setting but when I am trying to add cron job by the following command, I am not able to add the job. Django Version: 1.8.1 django-crontab: 0.7.1 Command…
Vikram Singh Chandel
  • 1,290
  • 2
  • 17
  • 36
2
votes
1 answer

cron job 'django-cron' not running in ubuntu cron tab

I am using django_cron for a schedule a job, when i am use python manage.py runcrons this work good. but after adding the cron job in ubuntu cron list job is not executing. My setting.py is: CRON_CLASSES = [ …
Yogesh dwivedi Geitpl
  • 4,252
  • 2
  • 20
  • 34
2
votes
1 answer

Django-cron not executing job

I am trying to use Django-cron to regularly run a script on my Django server. It seems as though the cronScheduler is registering the Test class as "class ran" prints to my terminal, but I have not found any indication that the job is run (i.e. I…
monstermac77
  • 256
  • 3
  • 24
2
votes
3 answers

django-cron does not work

After installing the django_cron correctly, i write the following codes named as cron.py in django app to call django_cron to execute. But it's so odd that this script does not work at all! from django_cron import cronScheduler, Job from…
Jeffrey S.
  • 33
  • 6
1
2 3 4 5