0

I am using python 2.7 with django 1.8. I have the admin panel ready and working.

What I want is to run a (python) script every 5-10 minutes (cron?) which pulls the data from records specified by the admin. Any pointers how do I proceed?

  • It is unclear what you mean by "from records specified by the admin" – coldmind Jul 09 '15 at 14:25
  • @coldmind, my database has two fields and multiple records. The admin will select any two records and I need to compute the logical 'AND' value of the second field those records. I need to do this for all the combinations selected by the admin. And I need to keep repeating this every 5 mins. Question 1: Where should I write my logic to do this? (I'm using Django) Question 2: How to automate this to run every 5 secs? – Koding Koding Jul 09 '15 at 16:46

2 Answers2

0

Take a look at this question, I think you have the same goals.

Django - Set Up A Scheduled Job?

Community
  • 1
  • 1
annndrey
  • 1,768
  • 2
  • 20
  • 24
0

I recommend you to take a look at https://pypi.python.org/pypi/django-celery

Hope it helps!

bcap
  • 500
  • 5
  • 14