Hi Anthony,
Scenario is : I've to send a 'status' SMS to a phone_number after every 30 minutes and Append its Status statement on a webpage, Since I have to send SMS after every 30 minutes, I have to call function after 30 minutes each. This is what i'm trying to implement, I've already coded all function in python, i'm getting difficulties in web part only. Plus one more problem, i'm using request.now for getting date and time, however i'm getting same value. for i in range(5): print request.now time.sleep(5) pass output i'm getting is : 2016-07-13 21:27:50.658693 2016-07-13 21:27:50.658693 2016-07-13 21:27:50.658693 2016-07-13 21:27:50.658693 2016-07-13 21:27:50.658693 expected output is delay of 5 seconds each time. Best, Chetan Jain On Wed, Jul 13, 2016 at 12:04 AM, Anthony <abasta...@gmail.com> wrote: > On Tuesday, July 12, 2016 at 11:41:20 AM UTC-4, Massimo Di Pierro wrote: >> >> forget load in this case. >> >> <div id="target"> >> </div> >> >> <script> >> var counter = 0; >> var minutes = 2; >> var max_calls = 10; >> var url = "{{=URL('call')}}"; >> var f = function() { >> counter = counter + 1; >> jQuery.get(url).done(function(data) { >> jQuery('#target').html(data); >> if(counter<max_calls) >> setTimeout(f, minutes*60*1000); >> }); >> } >> f(); >> </script> >> > > How is the above different from: > > {{=LOAD('call', ajax=True, timeout=2*60, times=10)}} > > Anthony > > >> >> On Tuesday, 12 July 2016 08:47:44 UTC-5, Chetan Jain wrote: >>> >>> URL : https://pqr.pythonanywhere.com/ajax/default/index >>> >>> Best, >>> Chetan Jain >>> >>> On Tue, Jul 12, 2016 at 6:07 PM, Massimo Di Pierro < >>> massimo.dipie...@gmail.com> wrote: >>> >>>> It is not clear. Where is your app? >>>> >>>> >>>> On Tuesday, 12 July 2016 06:32:29 UTC-5, Chetan Jain wrote: >>>>> >>>>> Hi Anthony, >>>>> >>>>> i've created one 24 hours web2py application at pythonanywhere.com, >>>>> please let me know when you have 10-15 minutes of time, so that i can >>>>> rectify my problem. >>>>> Thanks in advance. >>>>> >>>>> >>>>> >>>>> >>>>> On Tue, Jul 12, 2016 at 7:43 AM, Anthony <abasta...@gmail.com> wrote: >>>>> >>>>>> If your view includes an {{=i}} variable, then your function must >>>>>> return a dictionary with "i" as one of its keys. Hard to say what's wrong >>>>>> without seeing the current version of this function. >>>>> >>>>> >>>>> >>>>> >>>>> Best, >>>>> Chetan Jain >>>>> >>>> -- >>>> Resources: >>>> - http://web2py.com >>>> - http://web2py.com/book (Documentation) >>>> - http://github.com/web2py/web2py (Source code) >>>> - https://code.google.com/p/web2py/issues/list (Report Issues) >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "web2py-users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to web2py+unsubscr...@googlegroups.com. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.