On Oct 22, 2018, at 12:08, Charley Paulus <charley.pau...@gmail.com> wrote: > 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.
That is correct. A view function/object is only called when a site visitor is routed to that callable by the URL configuration. > 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 I'm not clear on your second condition, but you are probably interested in Celery for the first. http://www.celeryproject.org/ Alternatively, some clouds provide the ability to run code on a regular basis. If your Django code is not closely coupled with cron job, you could use AWS Lambda. https://docs.aws.amazon.com/lambda/latest/dg/with-scheduled-events.html If it is tightly coupled and Celery is too powerful for your needs, you could use an AWS Lambda (or Azure Function, etc) to send a request to your Django API on a regular basis. Andrew https://jambonsw.com https://django-unleashed.com -- 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+unsubscr...@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/7DECDBA7-AF86-468C-A275-CC593CE10F0B%40andrewsforge.com. For more options, visit https://groups.google.com/d/optout.