Hai Dave,

I ran your code and checked the field 'traceback' in the table
'scheduler_run' for the failing task. I found:

Traceback (most recent call last):
>   File "/Users/ncdegroot/web2py/gluon/scheduler.py", line 315, in executor
>     result = dumps(_function(*args, **vars))
>   File "applications/welcome/models/scheduler.py", line 16, in saveIdOut
>     print "haha " + a
> TypeError: cannot concatenate 'str' and 'int' objects



The cause of this is the line in your task:

print 'haha' + b



When queing you give the task two integer parameters in [ 0,1]. In python
you can't directly concatenate a string and an int. It should be

print 'haha'+str(i)


With this change your tast is repeating 6 times as intended.

But I know it's only testcode. I  expect you get the hint: Just use the
traceback field to check why a certain run of your task is failing.

There is a nice plugin by Niphlod I'm using in my apps to queue and check
tasks. Make it's easier. See https://github.com/niphlod/cs_monitor_plugin

Nico de Groot


2016-11-11 19:59 GMT+01:00 Dave S <snidely....@gmail.com>:

>
>
> On Friday, November 11, 2016 at 4:15:46 AM UTC-8, Yebach wrote:
>>
>> Ok thanx
>>
>> How and where do I add one time controller, or application start?
>>  my task will be executed once per hour
>>
>>
> Was the example I pointed not clear?  What questions did you have after
> reading it?  What could I explain better?
>
> /dps
>
>
> --
> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/web2py/FK1ygjNNjDU/unsubscribe.
> To unsubscribe from this group and all its topics, 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.

Reply via email to