Re: Trigger actions independently of url request

2018-10-29 Thread Mario R. Osorio
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 w

Re: Trigger actions independently of url request

2018-10-27 Thread Charley Paulus
Hi Joel, Thanks for sharing your experience. That’s perfect. This way I can make use of my Django models in the script called by cron. Best regards, Charley Paulus +1 917 692 2645 > On Oct 26, 2018, at 22:22, Joel wrote: > > There's nothing that prevents you from doing the necessary imports

Re: Trigger actions independently of url request

2018-10-26 Thread Joel
There's nothing that prevents you from doing the necessary imports of your django model and other required modules in a python script, and then have it run by cron. Is there? I've operated python scripts outside of the django application, just to import certain files into the database, which needs

Re: Trigger actions independently of url request

2018-10-26 Thread Ryan Nowakowski
Celery is probably what you want. It allows you to run scheduled tasks. Alternatively, you can create a custom management command and run that periodically some other way: Cron, etc. On October 22, 2018 3:11:09 PM CDT, Charley Paulus wrote: >Hi Andrew, > >Thank you for your answer. > >To bette

Re: Trigger actions independently of url request

2018-10-22 Thread Charley Paulus
Hi Andrew, Thank you for your answer. To better clarify my need, here is one use case: 1) I would like my server (where Django is) to ping a remote address (let's say google.com) every 10 minutes, and put the result (communication ok or not) in a Django-generated database. 2) Then I will have a

Re: Trigger actions independently of url request

2018-10-22 Thread Andrew Pinkham
On Oct 22, 2018, at 12:08, Charley Paulus 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/

Trigger actions independently of url request

2018-10-22 Thread Charley Paulus
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 e