Monday, October 29, 2018

Re: Trigger actions independently of url request

I'm far from being an expert but I think yours is a rather simple operation that needs to be executed every n minutes.

I think that in the case you're explaining, Celery is an overkill. Why not go with a cron job?
You might want to create a combination of bash and python scripts to do exactly what you need but you'll have a whole lot less headaches.


On Monday, October 22, 2018 at 12:29:19 PM UTC-4, Charley Paulus wrote:
Hi,

After reading the Django tutorial, my understanding (I hope I'm wrong) is that the only way to trigger a function of a Django app is when someone on the client side request the url related to that function.

But what if I want the server to run a function indenpendently of a url call, for example:
- every 10 minutes
- when a pre-defined combination of variables become true

Where should such code live?

Thank you.
Best regards,
Charley

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/af077eff-9e90-44ae-8ae0-050e986e830a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment